summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-08-28 16:33:53 +0200
committerVicent Marti <vicent@github.com>2014-08-28 16:33:53 +0200
commitd99c8ca1783cfd04869e88f8707c036fc6053a05 (patch)
tree3d0be8ec9a6517716898fb358e617a8773c1b047 /src
parent69db89342712f47ee84d9368823ec294a0db1c65 (diff)
parent05f0d0c1190f0a3922d48d9f35c6ef6f3c2048a7 (diff)
downloadlibgit2-d99c8ca1783cfd04869e88f8707c036fc6053a05.tar.gz
Merge pull request #2539 from libgit2/cmn/ahead-behind-order
Fix ahead-behind results
Diffstat (limited to 'src')
-rw-r--r--src/graph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph.c b/src/graph.c
index 1c264d997..8accd808c 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -124,9 +124,9 @@ static int ahead_behind(git_commit_list_node *one, git_commit_list_node *two,
(commit->flags & (PARENT1 | PARENT2)) == (PARENT1 | PARENT2))
continue;
else if (commit->flags & PARENT1)
- (*behind)++;
- else if (commit->flags & PARENT2)
(*ahead)++;
+ else if (commit->flags & PARENT2)
+ (*behind)++;
for (i = 0; i < commit->out_degree; i++) {
git_commit_list_node *p = commit->parents[i];