diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-25 14:03:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-25 14:03:50 -0700 |
commit | 0166592495e21b075fa48225ff21568269bf51d4 (patch) | |
tree | 21c295f211ad2aeaa798222e7c5564f17a90a429 /t | |
parent | 488ee2fe21ca69b90aa2b43dc9e30279a12cca63 (diff) | |
parent | 205ffa94be8f6492eef4bdaa3315e7fdc7e64e0b (diff) | |
download | git-0166592495e21b075fa48225ff21568269bf51d4.tar.gz |
Merge branch 'jc/add-n-u'
* jc/add-n-u:
Make git add -n and git -u -n output consistent
"git-add -n -u" should not add but just report
Conflicts:
builtin-add.c
builtin-mv.c
cache.h
read-cache.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t2200-add-update.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index b664341926..f57a6e077c 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -111,4 +111,21 @@ test_expect_success 'touch and then add explicitly' ' ' +test_expect_success 'add -n -u should not add but just report' ' + + ( + echo "add '\''check'\''" && + echo "remove '\''top'\''" + ) >expect && + before=$(git ls-files -s check top) && + echo changed >>check && + rm -f top && + git add -n -u >actual && + after=$(git ls-files -s check top) && + + test "$before" = "$after" && + test_cmp expect actual + +' + test_done |