aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-25 16:06:57 -0700
committerJunio C Hamano <gitster@pobox.com>2021-10-25 16:06:57 -0700
commit6ffb5fc06940ebb312b5cb010246e27c1b6aead0 (patch)
tree92e7686a64e75480b282d715971594674f25554f /t
parent525705a0a24ec13aedda8acc5f826295f7888c0e (diff)
parente578d0311d7b19ebd8cdadc6941f2aa060b7a850 (diff)
downloadgit-6ffb5fc06940ebb312b5cb010246e27c1b6aead0.tar.xz
Merge branch 'rs/add-dry-run-without-objects'
Stop "git add --dry-run" from creating new blob and tree objects. * rs/add-dry-run-without-objects: add: don't write objects with --dry-run
Diffstat (limited to 't')
-rwxr-xr-xt/t2200-add-update.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 45ca35d60a..94c4cb0672 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -129,12 +129,15 @@ test_expect_success 'add -n -u should not add but just report' '
echo "remove '\''top'\''"
) >expect &&
before=$(git ls-files -s check top) &&
+ git count-objects -v >objects_before &&
echo changed >>check &&
rm -f top &&
git add -n -u >actual &&
after=$(git ls-files -s check top) &&
+ git count-objects -v >objects_after &&
test "$before" = "$after" &&
+ test_cmp objects_before objects_after &&
test_cmp expect actual
'