diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-08 23:51:49 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-18 21:06:04 +0200 |
commit | 702ac40897050b686814463c7ee25f48390bd796 (patch) | |
tree | b59c2570bea8769efcf035d6e7d27864794504b6 | |
parent | 98e484b9d96ccf94b0417897efc618952e785af3 (diff) | |
download | libgit2-702ac40897050b686814463c7ee25f48390bd796.tar.gz |
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.
-rw-r--r-- | src/revwalk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/revwalk.c b/src/revwalk.c index adc769946..83c2ff8c7 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -162,6 +162,10 @@ static int push_commit(git_revwalk *walk, const git_oid *oid, int uninteresting, if (commit == NULL) 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) walk->did_hide = 1; else |