提交 2ecbd0a0 编写于 作者: A Adam Simpkins 提交者: Junio C Hamano

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: NAdam Simpkins <adam@adamsimpkins.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 182fb4df
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册