summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorØystein Walle <oystwa@gmail.com>2021-05-05 14:52:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-06 21:14:04 (GMT)
commita1989cf7b8d062960b6f8de00435711c45b95285 (patch)
treed69953e957e80de89da1c3755cfe1778123482ce /t
parent7e391989789db82983665667013a46eabc6fc570 (diff)
downloadgit-a1989cf7b8d062960b6f8de00435711c45b95285.zip
git-a1989cf7b8d062960b6f8de00435711c45b95285.tar.gz
git-a1989cf7b8d062960b6f8de00435711c45b95285.tar.bz2
add: die if both --dry-run and --interactive are given
The interactive machinery does not obey --dry-run. Die appropriately if both flags are passed. Signed-off-by: Øystein Walle <oystwa@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3700-add.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index b3b122f..171b323 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -343,6 +343,10 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out
test_cmp expect.err actual.err
'
+test_expect_success 'git add --dry-run --interactive should fail' '
+ test_must_fail git add --dry-run --interactive
+'
+
test_expect_success 'git add empty string should fail' '
test_must_fail git add ""
'