diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-26 03:11:43 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-26 03:11:43 +0300 |
commit | b988427918c767fc7782a387c9c8de9e147b983d (patch) | |
tree | 4828e30bcbaae1c5c683bea9506c08a55911c6ff /revision.c | |
parent | 1fc3c0ad407008c2f71dd9ae1241d8b75f8ef886 (diff) | |
parent | a79c6b60817c74534815bf132f0b26aa8e325874 (diff) |
Merge branch 'rs/diff-caret-bang-with-parents'
"git diff rev^!" did not show combined diff to go to the rev from
its parents.
* rs/diff-caret-bang-with-parents:
diff: support ^! for merges
revisions.txt: unspecify order of resolved parts of ^!
revision: use strtol_i() for exclude_parent
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/revision.c b/revision.c index 8f2623b3b5..0760e78936 100644 --- a/revision.c +++ b/revision.c @@ -2113,9 +2113,8 @@ static int handle_revision_arg_1(const char *arg_, struct rev_info *revs, int fl int exclude_parent = 1; if (mark[2]) { - char *end; - exclude_parent = strtoul(mark + 2, &end, 10); - if (*end != '\0' || !exclude_parent) + if (strtol_i(mark + 2, 10, &exclude_parent) || + exclude_parent < 1) return -1; } |