From: Adam Simpkins <adam@adamsimpkins.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Teemu Likonen <tlikonen@iki.fi>, git@vger.kernel.org
Subject: Re: log --graph --first-parent weirdness
Date: Thu, 5 Jun 2008 02:28:13 -0700 [thread overview]
Message-ID: <20080605092812.GA14116@adamsimpkins.net> (raw)
In-Reply-To: <7v1w3dxeh9.fsf@gitster.siamese.dyndns.org>
On Wed, Jun 04, 2008 at 11:05:38AM -0700, Junio C Hamano wrote:
>
> I'd really suggest changing the "M" and use "*" everywhere.
That's fine with me. Here's a simple patch to change the behavior.
-- >8 --
"git log --graph": print '*' for all commits, including merges
Previously, merge commits were printed with 'M' instead of '*'. This
had the potential to confuse users when not all parents of the merge
commit were included in the log output.
As Junio has pointed out, merge commits can almost always be easily
identified from the log message, anyway.
Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
---
graph.c | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/graph.c b/graph.c
index edfab2d..c50adcd 100644
--- a/graph.c
+++ b/graph.c
@@ -638,20 +638,6 @@ static void graph_output_commit_char(struct git_graph *graph, struct strbuf *sb)
}
/*
- * Print 'M' for merge commits
- *
- * Note that we don't check graph->num_parents to determine if the
- * commit is a merge, since that only tracks the number of
- * "interesting" parents. We want to print 'M' for merge commits
- * even if they have less than 2 interesting parents.
- */
- if (graph->commit->parents != NULL &&
- graph->commit->parents->next != NULL) {
- strbuf_addch(sb, 'M');
- return;
- }
-
- /*
* Print '*' in all other cases
*/
strbuf_addch(sb, '*');
--
1.5.6.rc1.13.g14be6
next prev parent reply other threads:[~2008-06-05 9:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 15:00 log --graph --first-parent weirdness Teemu Likonen
2008-06-04 15:08 ` Teemu Likonen
2008-06-04 17:12 ` Junio C Hamano
2008-06-04 17:38 ` Teemu Likonen
2008-06-04 18:04 ` Adam Simpkins
2008-06-05 8:56 ` [PATCH] graph API: fix "git log --graph --first-parent" Adam Simpkins
2008-06-04 18:05 ` log --graph --first-parent weirdness Junio C Hamano
2008-06-05 1:37 ` Ping Yin
2008-06-05 9:28 ` Adam Simpkins [this message]
2008-06-05 9:50 ` Teemu Likonen
2008-06-05 18:31 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080605092812.GA14116@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.
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 NNTP newsgroup(s).