diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:37:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:37:33 -0700 |
commit | 90e8b9b23dff20946a0eacdf8abedce7e32c1d78 (patch) | |
tree | 013a475f89cb949c7b448620c9efc009af17b59e /t | |
parent | 81f90684bf879f4e149a2aeb277daf1c38fab16e (diff) | |
parent | 75973b2cb58bf2b3038c5c214fc0a1b96d6868fe (diff) | |
download | git-90e8b9b23dff20946a0eacdf8abedce7e32c1d78.tar.gz git-90e8b9b23dff20946a0eacdf8abedce7e32c1d78.tar.xz |
Merge branch 'jc/fix-add-u-unmerged' into maint
* jc/fix-add-u-unmerged:
Fix "add -u" that sometimes fails to resolve unmerged paths
Conflicts:
builtin/add.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t2200-add-update.sh | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index 856e7da1f..7206c1374 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -149,31 +149,21 @@ test_expect_success 'add -u resolves unmerged paths' ' echo 3 >path1 && echo 2 >path3 && echo 2 >path5 && - git add -u && - git ls-files -s path1 path2 path3 path4 path5 path6 >actual && - { - echo "100644 $three 0 path1" - echo "100644 $one 1 path3" - echo "100644 $one 1 path4" - echo "100644 $one 3 path5" - echo "100644 $one 3 path6" - } >expect && - test_cmp expect actual && - # Bonus tests. Explicit resolving - git add path3 path5 && + # Explicit resolving by adding removed paths should fail test_must_fail git add path4 && test_must_fail git add path6 && - git rm path4 && - git rm path6 && - git ls-files -s "path?" >actual && + # "add -u" should notice removals no matter what stages + # the index entries are in. + git add -u && + git ls-files -s path1 path2 path3 path4 path5 path6 >actual && { echo "100644 $three 0 path1" echo "100644 $two 0 path3" echo "100644 $two 0 path5" - } >expect - + } >expect && + test_cmp expect actual ' test_expect_success '"add -u non-existent" should fail' ' |