Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2009-11-26 22:11:59 +0300
committerJunio C Hamano <gitster@pobox.com>2009-11-27 08:16:54 +0300
commit382da4023f155eabdda58ebd595a1e142408a56d (patch)
treefa952e18916b7632f12e8136d034423b5de18445 /builtin-log.c
parent78d553b7d7b269bb22ebd8b1198657c37484a3a0 (diff)
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c3
1 files changed, 2 insertions, 1 deletions
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;