]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'fc/maint-format-patch-pathspec-dashes' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 3 Dec 2009 21:54:25 +0000 (13:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Dec 2009 21:54:25 +0000 (13:54 -0800)
* fc/maint-format-patch-pathspec-dashes:
  format-patch: add test for parsing of "--"
  format-patch: fix parsing of "--" on the command line

builtin-log.c
t/t4014-format-patch.sh

index 7b91c914236a8e196190663fdbc3be4581539791..0cf978e0942a896606db9e4c17c9b9f0f3417daa 100644 (file)
@@ -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;
index cab6ce2e97b2439730915c12b5b141e634e759c5..74e5b63bbf7895f383323917c614679afd2d29b1 100755 (executable)
@@ -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