Skip to content

Commit

Permalink
Merge branch 'fc/maint-format-patch-pathspec-dashes' into maint
Browse files Browse the repository at this point in the history
* fc/maint-format-patch-pathspec-dashes:
  format-patch: add test for parsing of "--"
  format-patch: fix parsing of "--" on the command line
  • Loading branch information
Junio C Hamano committed Dec 3, 2009
2 parents 99292c6 + 7e93d3b commit c8b1d76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
*/
argc = parse_options(argc, argv, prefix, builtin_format_patch_options,
builtin_format_patch_usage,
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |
PARSE_OPT_KEEP_DASHDASH);

if (do_signoff) {
const char *committer;
Expand Down
5 changes: 5 additions & 0 deletions t/t4014-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -536,4 +536,9 @@ test_expect_success 'format-patch --signoff' '
grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
'

test_expect_success 'format-patch -- <path>' '
git format-patch master..side -- file 2>error &&
! grep "Use .--" error
'

test_done

0 comments on commit c8b1d76

Please sign in to comment.