Skip to content

Commit 11dd2b2

Browse files
jacob-kellergitster
authored andcommitted
notes: add tests for --commit/--abort/--strategy exclusivity
Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 93efcad commit 11dd2b2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t3310-notes-merge-manual-resolve.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,18 @@ y and z notes on 1st commit
314314
315315
EOF
316316

317+
test_expect_success 'do not allow mixing --commit and --abort' '
318+
test_must_fail git notes merge --commit --abort
319+
'
320+
321+
test_expect_success 'do not allow mixing --commit and --strategy' '
322+
test_must_fail git notes merge --commit --strategy theirs
323+
'
324+
325+
test_expect_success 'do not allow mixing --abort and --strategy' '
326+
test_must_fail git notes merge --abort --strategy theirs
327+
'
328+
317329
test_expect_success 'finalize conflicting merge (z => m)' '
318330
# Resolve conflicts and finalize merge
319331
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha1 <<EOF &&

0 commit comments

Comments
 (0)