commit - 1eb5d2a086f570f5bd47339ea2f7e477d9503422
commit + c3b9af18468be6672f62e2d321b5fc2893837c62
blob - c40836b609cfeffeedd9916e00ee56432e887ee5
blob + ee6313e0eeacb23072fc990719f2ed3bc32a7459
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
test_done "$testroot" "0"
}
+
+test_update_changes_file_to_dir() {
+ local testroot=`test_init update_changes_file_to_dir`
+
+ got checkout $testroot/repo $testroot/wt > /dev/null
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ test_done "$testroot" "$ret"
+ return 1
+ fi
+ git_rm $testroot/repo alpha
+ mkdir $testroot/repo/alpha
+ echo eta > $testroot/repo/alpha/eta
+ (cd $testroot/repo && git add alpha/eta)
+ git_commit $testroot/repo -m "changed alpha into directory"
+
+ (cd $testroot/wt && got update > $testroot/stdout 2> $testroot/stderr)
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ ret="xfail change file into directory"
+ fi
+ test_done "$testroot" "$ret"
+}
+
test_update_merges_file_edits() {
local testroot=`test_init update_merges_file_edits`
run_test test_update_creates_missing_parent
run_test test_update_creates_missing_parent_with_subdir
run_test test_update_file_in_subsubdir
+run_test test_update_changes_file_to_dir
run_test test_update_merges_file_edits
run_test test_update_keeps_xbit
run_test test_update_clears_xbit