diff options
author | Jeff King <peff@peff.net> | 2017-03-15 12:56:23 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-15 12:08:36 -0700 |
commit | b16a991c1be5681b4b673d4343dfcc0c2f5ad498 (patch) | |
tree | 7b5f6a56e3955b4f1b0fbfbf5413007289892bc7 /t/t4013/diff.diff_--no-index_--raw_--no-abbrev_dir2_dir | |
parent | preparing for 2.10.3 (diff) | |
download | tgif-b16a991c1be5681b4b673d4343dfcc0c2f5ad498.tar.xz |
cherry-pick: detect bogus arguments to --mainline
The cherry-pick and revert commands use OPT_INTEGER() to
parse --mainline. The stock parser is smart enough to reject
non-numeric nonsense, but it doesn't know that parent
counting starts at 1.
Worse, the value "0" is indistinguishable from the unset
case, so a user who assumes the counting is 0-based will get
a confusing message:
$ git cherry-pick -m 0 $merge
error: commit ... is a merge but no -m option was given.
Let's use a custom callback that enforces our range.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_--no-index_--raw_--no-abbrev_dir2_dir')
0 files changed, 0 insertions, 0 deletions