Merge branch 'hu/cherry-pick-previous-branch'
Just like "git checkout -" knows to check out and "git merge -" knows to merge the branch you were previously on, "git cherry-pick" now understands "git cherry-pick -" to pick from the previous branch. * hu/cherry-pick-previous-branch: cherry-pick: allow "-" as abbreviation of '@{-1}'
This commit is contained in:
@ -202,6 +202,8 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
opts.action = REPLAY_PICK;
|
||||
git_config(git_default_config, NULL);
|
||||
if (!strcmp(argv[1], "-"))
|
||||
argv[1] = "@{-1}";
|
||||
parse_args(argc, argv, &opts);
|
||||
res = sequencer_pick_revisions(&opts);
|
||||
if (res < 0)
|
||||
|
Reference in New Issue
Block a user