All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raphael Bauer <raphael@pdev.de>
To: Git ML <git@vger.kernel.org>
Subject: BUG: %+ format placeholder and colors
Date: Wed, 23 Mar 2022 00:42:51 +0100	[thread overview]
Message-ID: <600744a4-8d5a-0ef3-6e75-e3637e7070aa@pdev.de> (raw)
In-Reply-To: <6f0d1c12-4cf8-bbdd-96d4-eae99317e2e4@pdev.de>

Hello,

I am not familiar with using mailing list for bug tracking. I already 
reported this bug, but got no answer, so I wanted to mention it again.

* What did you do before the bug happened? (Steps to reproduce your issue)
git log --pretty=format:'%h%Cred%+d test' --graph

This also happens with a PAGER=cat environment, just to preclude this is 
related to the pager.

* What did you expect to happen? (Expected behavior)
A graph listing of commit hashes and, if ref names for this commit 
exist, a second line.
This line should be colored in red and contain the ref names as well as 
the string 'test'.
In the case of no refs, the string 'test' should appear in line with the 
commit hash, also in red.

* What happened instead? (Actual behavior)
In case of ref names / a second line, the color is missing completely.
The colors work correctly for the single line case (when no ref names 
are available).

* What's different between what you expected and what actually happened?
The %+d placeholder inserts newlines if the string is non-empty, but in 
doing so, resets any coloring information.
This is demonstrated by the string 'test' which should always show in 
red, but does so only if %+d is not expanded.
This makes it currently impossible to color anything with the %+ 
placeholder.


If this is already tracked, I apologize.

  reply	other threads:[~2022-03-22 23:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 22:38 Pretty format color bug Raphael Bauer
2022-02-21 23:29 ` Ævar Arnfjörð Bjarmason
2022-02-22  0:15   ` Raphael Bauer
2022-03-22 23:42     ` Raphael Bauer [this message]
2022-03-23  2:49       ` BUG: %+ format placeholder and colors Ævar Arnfjörð Bjarmason
2022-03-23 18:12         ` Raphael
2022-04-05 15:45           ` [PATCH] pretty format: fix colors on %+ placeholder newline Raphael Bauer
2022-04-06 21:16             ` Junio C Hamano
2022-04-08 13:18               ` Raphael
2022-04-08 15:14                 ` Ævar Arnfjörð Bjarmason
2022-04-08 23:40                 ` 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=600744a4-8d5a-0ef3-6e75-e3637e7070aa@pdev.de \
    --to=raphael@pdev.de \
    --cc=git@vger.kernel.org \
    /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.