summaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-03 15:35:19 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-03 15:35:19 -0700
commitc4da6c0b76691c63e3f4aea3f1079b37ac0e6d98 (patch)
tree7b7173e18d6823c743fd58df05144387261347b2 /builtin/revert.c
parentMerge branch 'cb/http-multi-curl-auth' into maint (diff)
parentcherry-pick: do not expect file arguments (diff)
downloadtgif-c4da6c0b76691c63e3f4aea3f1079b37ac0e6d98.tar.xz
Merge branch 'cb/cherry-pick-rev-path-confusion' into maint
The command line parser choked "git cherry-pick $name" when $name can be both revision name and a pathname, even though $name can never be a path in the context of the command. By Clemens Buchacher * cb/cherry-pick-rev-path-confusion: cherry-pick: do not expect file arguments
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index e6840f23dc..92f3fa5f57 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -181,12 +181,15 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
if (opts->subcommand != REPLAY_NONE) {
opts->revs = NULL;
} else {
+ struct setup_revision_opt s_r_opt;
opts->revs = xmalloc(sizeof(*opts->revs));
init_revisions(opts->revs, NULL);
opts->revs->no_walk = 1;
if (argc < 2)
usage_with_options(usage_str, options);
- argc = setup_revisions(argc, argv, opts->revs, NULL);
+ memset(&s_r_opt, 0, sizeof(s_r_opt));
+ s_r_opt.assume_dashdash = 1;
+ argc = setup_revisions(argc, argv, opts->revs, &s_r_opt);
}
if (argc > 1)