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>2022-10-26 03:11:43 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-26 03:11:43 +0300
commitb988427918c767fc7782a387c9c8de9e147b983d (patch)
tree4828e30bcbaae1c5c683bea9506c08a55911c6ff /revision.c
parent1fc3c0ad407008c2f71dd9ae1241d8b75f8ef886 (diff)
parenta79c6b60817c74534815bf132f0b26aa8e325874 (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.c5
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;
}