Re: [PATCH v2 1/5] refs: trim newline from reflog message
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 6, 2021, 22:38 UTC
- Message-ID
- <874kaxnxb0.fsf@evledraar.gmail.com>
- In-Reply-To
- <995d450da42f35b4cecdd699fa1b1a74518f481e.1630947142.git.gitgitgadget@gmail.com>
On Mon, Sep 06 2021, Han-Wen Nienhuys via GitGitGadget wrote:
Show 6 quoted lines
> From: Han-Wen Nienhuys <hanwen@google.com> > [...] > - puts(reflog_msg[i]); > + puts(reflog_msg[i]); /* XXX - this puts a > + newline. Did we put two > + newlines beforehand? */
I recently added some tests for show-branch, see the tip of ab/show-branch-tests. This seems like it would be clearer to both you & reviewers if we first checked & test_cmp'd the reflog behavior of "git show-branch" in some "here's how it works now test", then made whatever non-changes to the format done here.
Presumably this newline mystery would become clear once we'd have coverage of its reflog codepaths.