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:
authorJunio C Hamano <gitster@pobox.com>2012-04-28 00:58:02 +0400
committerJunio C Hamano <gitster@pobox.com>2012-04-28 00:58:02 +0400
commit0fe59d768643df4bcab419bb52509cf608dc074b (patch)
tree6a366154679e53f443042a0c1a791802ed52fdf5 /builtin/revert.c
parent157a4767a56e37def5e156b60f03ee220208d8fb (diff)
parent6d5b93f29f5362b9b84954d87684705227984f9e (diff)
Merge branch 'cb/cherry-pick-rev-path-confusion'
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. The issue the patch addresses is real, but the way it is implemented felt unnecessarily invasive a bit. It may be cleaner for this caller to add the "--" to the end of the argv_array it passes to setup_revisions(). 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 e4ed0239ca..5462e676e2 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -182,12 +182,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)