aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-25 14:03:50 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-25 14:03:50 -0700
commit0166592495e21b075fa48225ff21568269bf51d4 (patch)
tree21c295f211ad2aeaa798222e7c5564f17a90a429 /t
parent488ee2fe21ca69b90aa2b43dc9e30279a12cca63 (diff)
parent205ffa94be8f6492eef4bdaa3315e7fdc7e64e0b (diff)
downloadgit-0166592495e21b075fa48225ff21568269bf51d4.tar.gz
git-0166592495e21b075fa48225ff21568269bf51d4.tar.xz
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-xt/t2200-add-update.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index b66434192..f57a6e077 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