1
0
mirror of https://github.com/git/git.git synced 2024-11-19 02:23:54 +01:00

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>
This commit is contained in:
Adam Simpkins 2008-05-23 19:24:10 -07:00 committed by Junio C Hamano
parent 182fb4df91
commit 2ecbd0a0db

@ -190,7 +190,10 @@ static void graph_insert_into_new_columns(struct git_graph *graph,
* Ignore uinteresting and pruned commits
*/
if (commit->object.flags & (UNINTERESTING | TREESAME))
{
*mapping_index += 2;
return;
}
/*
* If the commit is already in the new_columns list, we don't need to