git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Adam Simpkins <adam@adamsimpkins.net>
To: git@vger.kernel.org
Cc: Teemu Likonen <tlikonen@iki.fi>,
	Junio C Hamano <gitster@pobox.com>,
	Adam Simpkins <adam@adamsimpkins.net>
Subject: [PATCH 0/2] graph API: improve printing of merges
Date: Sun,  1 Jun 2008 13:56:56 -0700	[thread overview]
Message-ID: <1212353818-7031-1-git-send-email-adam@adamsimpkins.net> (raw)
In-Reply-To: <20080529085752.GA31865@adamsimpkins.net>

This is two minor patches to improve the display of merge commits in the
graph output.  The first fixes the "extra space" that appears sometimes,
as pointed out by Teemu Likonen.  I had previously posted 2 simple
options for fixing the problem, but neither one was best in all cases.
This patch is an improved version that dynamically chooses how the merge
commit should be displayed, based on the last line of the previous
commit's output.

For example, with the new changes, the code now prints:

$ git log --graph --pretty=format:%h -10 8d6afc1
M   8d6afc1
|\  
| M   f2fea68
| |\  
| M \   21dbe12
| |\ \  
M | \ \   41094b8
|\ \ \ \  
| M \ \ \   061ad5f
| |\ \ \ \  
| M \ \ \ \   fe041ad
| |\ \ \ \ \  
| | \ \ \ \ \     
| |  \ \ \ \ \    
| M-. \ \ \ \ \   cd1333d
| |\ \ \ \ \ \ \  
| | * | | | | | | cfcbd34
| | * | | | | | | 5398fed
| M | | | | | | |   539d84f
| |\ \ \ \ \ \ \ \  


The second patch improves the output for octopus merges, by avoiding
printing unnecessary padding lines before the commit when there aren't
any existing branch lines to the right of the merge.

Adam Simpkins (2):
  graph API: improve display of merge commits
  graph API: avoid printing unnecessary padding before some octopus
    merges

 graph.c |  123 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 101 insertions(+), 22 deletions(-)

  parent reply	other threads:[~2008-06-01 20:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 11:24 log --graph: extra space with --pretty=oneline Teemu Likonen
2008-05-28 11:34 ` Wincent Colaiuta
2008-05-29  8:57 ` Adam Simpkins
2008-05-29  9:03   ` [PATCH] graph API: improve output for merge commits (option 1) Adam Simpkins
2008-05-29  9:04   ` [PATCH] graph API: improve output for merge commits (option 2) Adam Simpkins
2008-05-29 10:25   ` log --graph: extra space with --pretty=oneline Teemu Likonen
2008-06-01 20:56   ` Adam Simpkins [this message]
2008-06-01 20:56     ` [PATCH 1/2] graph API: improve display of merge commits Adam Simpkins
2008-06-01 20:56       ` [PATCH 2/2] graph API: avoid printing unnecessary padding before some octopus merges Adam Simpkins
2008-06-01 21:50         ` Junio C Hamano
2008-06-02  0:04           ` Adam Simpkins
2008-06-02  4:41             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1212353818-7031-1-git-send-email-adam@adamsimpkins.net \
    --to=adam@adamsimpkins.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=tlikonen@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).