diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-25 16:06:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-25 16:06:57 -0700 |
commit | 6ffb5fc06940ebb312b5cb010246e27c1b6aead0 (patch) | |
tree | 92e7686a64e75480b282d715971594674f25554f /t | |
parent | Merge branch 'rs/disable-gc-during-perf-tests' (diff) | |
parent | add: don't write objects with --dry-run (diff) | |
download | tgif-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-x | t/t2200-add-update.sh | 3 |
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 ' |