Commit 733c4f3a by Russell Belfer Committed by Vicent Marti

more examples/log.c bug fixing

parent 5a169711
...@@ -94,11 +94,11 @@ static int add_revision(struct log_state *s, const char *revstr) ...@@ -94,11 +94,11 @@ static int add_revision(struct log_state *s, const char *revstr)
if (*revstr == '^') { if (*revstr == '^') {
revs.flags = GIT_REVPARSE_SINGLE; revs.flags = GIT_REVPARSE_SINGLE;
hide = !hide; hide = !hide;
if (!git_revparse_single(&revs.from, s->repo, revstr + 1))
return -1; if (git_revparse_single(&revs.from, s->repo, revstr + 1) < 0)
} else
if (!git_revparse(&revs, s->repo, revstr))
return -1; return -1;
} else if (git_revparse(&revs, s->repo, revstr) < 0)
return -1;
if ((revs.flags & GIT_REVPARSE_SINGLE) != 0) if ((revs.flags & GIT_REVPARSE_SINGLE) != 0)
push_rev(s, revs.from, hide); push_rev(s, revs.from, hide);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment