Skip to content

Commit e91162b

Browse files
dschogitster
authored andcommitted
t3701: verify that the diff.algorithm config setting is handled
Without this patch, there is actually no test in Git's test suite that covers the diff.algorithm feature. Let's add one. We do this by passing a bogus value and then expecting `git diff-files` to produce the appropriate error message. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0c3222c commit e91162b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t3701-add-interactive.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,16 @@ test_expect_success 'detect bogus diffFilter output' '
524524
test_must_fail force_color git add -p <y
525525
'
526526

527+
test_expect_success 'diff.algorithm is passed to `git diff-files`' '
528+
git reset --hard &&
529+
530+
>file &&
531+
git add file &&
532+
echo changed >file &&
533+
git -c diff.algorithm=bogus add -p 2>err &&
534+
test_i18ngrep "error: option diff-algorithm accepts " err
535+
'
536+
527537
test_expect_success 'patch-mode via -i prompts for files' '
528538
git reset --hard &&
529539

0 commit comments

Comments
 (0)