With the --graph option, the graph already outputs 'o' instead of '*'
for boundary commits. Make it emit '<' or '>' when --left-right is
specified.
(This change also disables the '^' prefix for UNINTERESTING commits.
The graph code currently doesn't print anything special for these
commits, since it assumes no UNINTERESTING, non-BOUNDARY commits are
displayed. This is potentially a bug if UNINTERESTING non-BOUNDARY
commits can actually be displayed via some code path.)
[jc: squashed the left-right change from Dscho and Adam's fixup into one]
Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previously, the graphing code printed lines coming out of a merge commit
for all of its parents, even if some of them were uninteresting. Now it
only prints lines for interesting commits.
For example, for a merge commit where only the first parent is
interesting, the code now prints:
* merge commit
* interesting child
instead of:
M merge commit
|\
* interesting child
Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 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>
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>