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
This commit is contained in:
@ -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
|
||||
|
||||
'
|
||||
|
Reference in New Issue
Block a user