Skip to content

Commit 9eba92f

Browse files
committed
Merge branch 'fc/maint-format-patch-pathspec-dashes'
Conflicts: t/t4014-format-patch.sh
2 parents 045c050 + 7e93d3b commit 9eba92f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

builtin-log.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
976976
*/
977977
argc = parse_options(argc, argv, prefix, builtin_format_patch_options,
978978
builtin_format_patch_usage,
979-
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);
979+
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |
980+
PARSE_OPT_KEEP_DASHDASH);
980981

981982
if (do_signoff) {
982983
const char *committer;

t/t4014-format-patch.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,4 +552,9 @@ test_expect_success 'format-patch --numstat should produce a patch' '
552552
git format-patch --numstat --stdout master..side > output &&
553553
test 6 = $(grep "^diff --git a/" output | wc -l)'
554554

555+
test_expect_success 'format-patch -- <path>' '
556+
git format-patch master..side -- file 2>error &&
557+
! grep "Use .--" error
558+
'
559+
555560
test_done

0 commit comments

Comments
 (0)