diff options
Diffstat (limited to 'third_party/git/t/t7001-mv.sh')
-rwxr-xr-x | third_party/git/t/t7001-mv.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/third_party/git/t/t7001-mv.sh b/third_party/git/t/t7001-mv.sh index 36b50d0b4c12..63d5f41a1247 100755 --- a/third_party/git/t/t7001-mv.sh +++ b/third_party/git/t/t7001-mv.sh @@ -177,7 +177,7 @@ test_expect_success "Sergey Vlasov's test case" ' date >ab.c && date >ab/d && git add ab.c ab && - git commit -m 'initial' && + git commit -m "initial" && git mv ab a ' @@ -248,6 +248,23 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' ' rm -f dirty dirty2 +# NB: This test is about the error message +# as well as the failure. +test_expect_success 'git mv error on conflicted file' ' + rm -fr .git && + git init && + >conflict && + test_when_finished "rm -f conflict" && + cfhash=$(git hash-object -w conflict) && + q_to_tab <<-EOF | git update-index --index-info && + 0 $cfhash 0Qconflict + 100644 $cfhash 1Qconflict + EOF + + test_must_fail git mv conflict newname 2>actual && + test_i18ngrep "conflicted" actual +' + test_expect_success 'git mv should overwrite symlink to a file' ' rm -fr .git && |