@matheusbsbs / matheus-bagliano / commits / 382da4023f
Fork 0

format-patch: fix parsing of "--" on the command line

When given a pathspec that does not match any path in the current work tree with an explicit "--": git format-patch <commit> -- <path> the command still complains that <path> does not exist in the current work tree and the user needs to explicitly specify "--" and errors out. This is because it incorrectly removes "--" from the command line arguments that is later passed to setup_revisions(). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Nov 26, 2009 at 21:11 UTC 382da4023f155eabdda58ebd595a1e142408a56d
1 file changed +2 -1
builtin-log.c
+2 -1
@@ -966,7 +966,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
966 */
967 argc = parse_options(argc, argv, prefix, builtin_format_patch_options,
968 builtin_format_patch_usage,
969 - PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);
969 + PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |
970 + PARSE_OPT_KEEP_DASHDASH);
971
972 if (do_signoff) {
973 const char *committer;