From 382da4023f155eabdda58ebd595a1e142408a56d Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 26 Nov 2009 21:11:59 +0200 Subject: [PATCH] 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 --- builtin-log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin-log.c b/builtin-log.c index 25e21ed415..cac98afddb 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; -- 2.11.4.GIT