@matheusbsbs / matheus-bagliano / commits / 2ecbd0a0db
Fork 0

graph API: fix graph mis-alignment after uninteresting commits

The graphing code had a bug that caused it to output branch lines incorrectly after ignoring an uninteresting commit. When computing how to match up the branch lines from the current commit to the next one, it forgot to take into account that it needed to initially start with 2 empty spaces where the missing commit would have gone. So, instead of drawing this, | * | <- Commit with uninteresting parent | / * | It used to incorrectly draw this: | * | <- Commit with uninteresting parent * | Signed-off-by: Adam Simpkins <adam@adamsimpkins.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Adam Simpkins committed May 23, 2008 at 19:24 UTC 2ecbd0a0db0f9d59a5df02a6daeb87e611171fa4
1 file changed +3
graph.c
+3
@@ -190,7 +190,10 @@ static void graph_insert_into_new_columns(struct git_graph *graph,
190 * Ignore uinteresting and pruned commits
191 */
192 if (commit->object.flags & (UNINTERESTING | TREESAME))
193 + {
194 + *mapping_index += 2;
195 return;
196 + }
197
198 /*
199 * If the commit is already in the new_columns list, we don't need to