diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-15 09:52:54 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-15 09:52:54 -0700 |
| commit | 068df18c90c335ebe28bda285e742a6408eec3b5 (patch) | |
| tree | f40261ce76b81d8cdbce26bab8c8633d417acaad /t/t4020-diff-external.sh | |
| parent | Merge branch 'jt/port-ci-whitespace-check-to-gitlab' (diff) | |
| parent | diff: fix --exit-code with external diff (diff) | |
| download | git-068df18c90c335ebe28bda285e742a6408eec3b5.tar.gz git-068df18c90c335ebe28bda285e742a6408eec3b5.zip | |
Merge branch 'rs/external-diff-with-exit-code'
The "--exit-code" option of "git diff" command learned to work with
the "--ext-diff" option.
* rs/external-diff-with-exit-code:
diff: fix --exit-code with external diff
diff: report unmerged paths as changes in run_diff_cmd()
Diffstat (limited to 't/t4020-diff-external.sh')
| -rwxr-xr-x | t/t4020-diff-external.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index fdd865f7c3..26430ca66b 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -172,6 +172,14 @@ test_expect_success 'no diff with -diff' ' grep Binary out ' +test_expect_success 'diff.external and --exit-code with output' ' + test_expect_code 1 git -c diff.external=echo diff --exit-code +' + +test_expect_success 'diff.external and --exit-code without output' ' + git -c diff.external=true diff --exit-code +' + echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file test_expect_success 'force diff with "diff"' ' |
