Commit 702ac408 by Carlos Martín Nieto

revwalk: don't insert uninteresting commits into the queue

When a commit is first set as unintersting and then pushed, we must take
care that we do not put it into the commit list as that makes us return
at least that commit (but maybe more) as we've inserted it into the list
because we have the assumption that we want anything in the commit list.
parent 98e484b9
...@@ -162,6 +162,10 @@ static int push_commit(git_revwalk *walk, const git_oid *oid, int uninteresting, ...@@ -162,6 +162,10 @@ static int push_commit(git_revwalk *walk, const git_oid *oid, int uninteresting,
if (commit == NULL) if (commit == NULL)
return -1; /* error already reported by failed lookup */ return -1; /* error already reported by failed lookup */
/* A previous hide already told us we don't want this commit */
if (commit->uninteresting)
return 0;
if (uninteresting) if (uninteresting)
walk->did_hide = 1; walk->did_hide = 1;
else else
......
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