git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] notes: don't indent empty lines
Date: Sun, 12 Sep 2021 01:53:23 -0400	[thread overview]
Message-ID: <CAPig+cTRo_bLrCyhWC5on-HHco=H=3Mc6Xfi4gRP0xVE+Xk=BA@mail.gmail.com> (raw)
In-Reply-To: <87wnnn8kba.fsf@evledraar.gmail.com>

On Sat, Sep 11, 2021 at 6:43 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Sat, Sep 11 2021, Eric Sunshine wrote:
> > Notes don't store the indented blank lines; it's only at output time,
> > such as with `git format-patch --notes` that the blank lines get
> > indented along with the rest of the note text (just as is happening in
> > your `git show` example in which the entire commit message is being
> > indented, including the blank lines).
>
> Ah, so with your change we'd end up with trimmed notes, but not the
> trimmed main body of the commit message?

That's correct. This "fix" is specific to the note-printing machinery
which is invoked by (at least) git-format-patch and git-log.

(Until your demonstration of git-show indentation, I wasn't even aware
that blank lines in commit messages were getting indented there, as
well.)

> > Anyhow, since then, I've discovered that `git format-patch
> > --range-diff` also indents blank lines. And you've now shown that `git
> > show` does, as well, so the behavior which triggered this "fix" turns
> > out to be somewhat normal in this project, rather than a one-off "bug"
> > in need of a fix.
>
> Per the above I wouldn't mind this just being changed for all of them,
> even one at a time.

I'm not a fan of the trailing whitespace either, however, Junio does
have the concern that there may be some tooling somewhere which relies
upon the "indented blank lines" (even if such tooling would not be
robust).

  reply	other threads:[~2021-09-12  5:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  7:21 [PATCH 0/3] suppress trailing whitespace on empty "notes" lines Eric Sunshine
2021-08-30  7:21 ` [PATCH 1/3] t3301: tolerate minor notes-related presentation changes Eric Sunshine
2021-08-30 17:09   ` Junio C Hamano
2021-08-30 18:16     ` Eric Sunshine
2021-08-30  7:21 ` [PATCH 2/3] t3303/t9301: make `notes` tests less brittle Eric Sunshine
2021-08-30  7:21 ` [PATCH 3/3] notes: don't indent empty lines Eric Sunshine
2021-08-30 17:10   ` Junio C Hamano
2021-08-30 17:41     ` Eric Sunshine
2021-08-30 17:56       ` Junio C Hamano
2021-08-30 18:04         ` Eric Sunshine
2021-09-10  5:18           ` Eric Sunshine
2021-09-10  5:21             ` Eric Sunshine
2021-09-10 18:33             ` Junio C Hamano
2021-09-10 20:31               ` Eric Sunshine
2021-09-11  1:53                 ` Ævar Arnfjörð Bjarmason
2021-09-11  9:15                   ` Eric Sunshine
2021-09-11 10:39                     ` Ævar Arnfjörð Bjarmason
2021-09-12  5:53                       ` Eric Sunshine [this message]
2021-09-12  8:22                         ` Junio C Hamano
2021-08-30 10:47 ` [RFC PATCH v2 0/2] suppress trailing whitespace on empty "notes" lines Ævar Arnfjörð Bjarmason
2021-08-30 10:47   ` [RFC PATCH v2 1/2] t3303/t9301: make `notes` tests less brittle Ævar Arnfjörð Bjarmason
2021-08-30 10:47   ` [RFC PATCH v2 2/2] notes: don't indent empty lines Ævar Arnfjörð Bjarmason
2021-08-30 16:45   ` [RFC PATCH v2 0/2] suppress trailing whitespace on empty "notes" lines Eric Sunshine
2021-08-30 16:50     ` Eric Sunshine
2021-08-30 17:04   ` 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='CAPig+cTRo_bLrCyhWC5on-HHco=H=3Mc6Xfi4gRP0xVE+Xk=BA@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).