]> git.ipfire.org Git - thirdparty/git.git/commit - graph.c
graph API: improve display of merge commits
authorAdam Simpkins <adam@adamsimpkins.net>
Sun, 1 Jun 2008 20:56:57 +0000 (13:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 1 Jun 2008 21:50:52 +0000 (14:50 -0700)
commit3395908ee481e91bbe3ba054a7419b071b09cdef
treeef7c62ff82201d010fa9726f05eb3938188c8e15
parentb7166cce8cf4053d9f21e69505bef8699da68903
graph API: improve display of merge commits

This change improves the way merge commits are displayed, to eliminate a
few visual artifacts.  Previously, merge commits were displayed as:

| M  \
| |\  |

As pointed out by Teemu Likonen, this didn't look nice if the rightmost
branch line was displayed as '\' on the previous line, as it then
appeared to have an extra space in it:

| |\
| M  \
| |\  |

This change updates the code so that branch lines to the right of merge
commits are printed slightly differently depending on how the previous
line was displayed:

| |\          | | |        | |  /
| M \         | M |        | M |
| |\ \        | |\ \       | |\ \

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
graph.c