From a1989cf7b8d062960b6f8de00435711c45b95285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Walle?= Date: Wed, 5 May 2021 16:52:04 +0200 Subject: add: die if both --dry-run and --interactive are given MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interactive machinery does not obey --dry-run. Die appropriately if both flags are passed. Signed-off-by: Øystein Walle Signed-off-by: Junio C Hamano --- t/t3700-add.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't/t3700-add.sh') diff --git a/t/t3700-add.sh b/t/t3700-add.sh index b3b122ff97..171b323f50 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 "" ' -- cgit v1.2.3