From: Felipe Contreras Date: Thu, 26 Nov 2009 19:11:59 +0000 (+0200) Subject: format-patch: fix parsing of "--" on the command line X-Git-Tag: v1.6.6-rc1~8^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=382da4023f155eabdda58ebd595a1e142408a56d;p=git.git 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 -- the command still complains that 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-log.c b/builtin-log.c index 25e21ed41..cac98afdd 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -966,7 +966,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;