All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: lolligerhans@gmx.de,  git@vger.kernel.org,
	 Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Subject: Re: [BUG] git log --graph --pretty=format misplaces graph characters when -p given
Date: Mon, 02 Feb 2026 12:49:36 -0800	[thread overview]
Message-ID: <xmqqo6m6yiov.fsf@gitster.g> (raw)
In-Reply-To: <CALnO6CCqwnTcQWSUBPV+o3OO=sMZJjj6jRuMNnBjV3F-dYx+0w@mail.gmail.com> (D. Ben Knoble's message of "Mon, 2 Feb 2026 15:27:22 -0500")

"D. Ben Knoble" <ben.knoble@gmail.com> writes:

> On Mon, Feb 2, 2026 at 11:22 AM <lolligerhans@gmx.de> wrote:
>>
>> Hello,
>>
>> Git can pretty-print a commit graph with git log --graph and a custom --pretty
>> format. I alias some uses of git log --graph --pretty, to which I then want to
>> manually add "-p" upon invocation.
>> ...
> Yep. I think this is because format:%h doesn't add a newline by
> default. With tformat:%h or format:%h%n, the issue goes away. (See
> "git help log" under "tformat:"—this is probably what you want in
> order to get "oneline"-style format.)

FWIW, "git log --pretty=tformat:<whatever>" has a handy short-hand
that is "git log --format=<whatever>" ;-)

      reply	other threads:[~2026-02-02 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 16:21 [BUG] git log --graph --pretty=format misplaces graph characters when -p given lolligerhans
2026-02-02 17:27 ` Pushkar Singh
2026-02-02 20:27 ` D. Ben Knoble
2026-02-02 20:49   ` Junio C Hamano [this message]

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=xmqqo6m6yiov.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lolligerhans@gmx.de \
    --cc=pushkarkumarsingh1970@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.