Commit Graph

53 Commits

Author SHA1 Message Date
Adam Simpkins
2ecbd0a0db 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>
2008-05-25 11:42:44 -07:00
Adam Simpkins
0724cb86c5 graph API: eliminate unnecessary indentation
This change improves the calculation of the amount of horizontal
padding, so that there is always exactly 1 space of padding.
Previously, most commits had 3 spaces of padding, but commits that
didn't have any children in the graph had only 1 space of padding.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05 18:55:39 -07:00
Adam Simpkins
c12172d2ea Add history graph API
This new API allows the commit history to be displayed as a text-based
graphical representation.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05 17:56:36 -07:00