diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-12-04 22:25:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-05 15:06:18 +0100 |
commit | 945dc55dda595a3e5449017797cb90599ed9ecb5 (patch) | |
tree | 98a75cac402c9a059823b6bf19fd75aa0c7b6f78 /t/t4014-format-patch.sh | |
parent | t4014: use test_config() (diff) | |
download | git-945dc55dda595a3e5449017797cb90599ed9ecb5.tar.xz git-945dc55dda595a3e5449017797cb90599ed9ecb5.zip |
format-patch: teach --no-base
If `format.useAutoBase = true`, there was no way to override this from
the command-line. Teach the `--no-base` option in format-patch to
override `format.useAutoBase`.
Helped-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index c7cc643adf..a5b6302a1c 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1958,6 +1958,12 @@ test_expect_success 'format-patch --base overrides format.useAutoBase' ' test_cmp expect actual ' +test_expect_success 'format-patch --no-base overrides format.useAutoBase' ' + test_config format.useAutoBase true && + git format-patch --stdout --no-base -1 >patch && + ! grep "^base-commit:" patch +' + test_expect_success 'format-patch --base with --attach' ' git format-patch --attach=mimemime --stdout --base=HEAD~ -1 >patch && sed -n -e "/^base-commit:/s/.*/1/p" -e "/^---*mimemime--$/s/.*/2/p" \ |