Re: [PATCH 0/3] Teach ref-filter API to correctly handle CRLF in messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio,

> Le 9 mars 2020 à 11:14, Junio C Hamano <gitster@xxxxxxxxx> a écrit :
> 
> "Philippe Blain via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
> 
>> The ref-filter API does not correctly handle commit or tag messages that use
>> CRLF as the line terminator. Such messages can be created with the--verbatim 
>> option of git commit and git tag, or by using git commit-tree directly.
>> 
>> This impacts the output of git branch -v, and git branch, git tag and git
>> for-each-ref when used with a --format argument containing the atoms 
>> %(contents:subject) or %(contents:body).
> 
> What is missing from the above is the definition of "correct".
> Without saying what you consider in the current behaviour is
> "incorrect" and why, the first sentence does not give the right
> information to readers.

You are right, I'll send a v2 shortly with an updated cover letter and commit message.

> Let me speculate why "such messages" are created by end users using
> the --verbatim option.  They probably have unusual message that
> needs to have whitespaces and characters that are stripped without
> the option at the end of the lines in the message, and they
> explicitly ask Git not to lose them with the option.  Perhaps CR may
> be among those that they want to retain.

That's possible. In my case what made me discover the bug is our old version of GitLab at work,
in which messages for merge commit created using the web UI contain CRLF [1].

[1] https://gitlab.com/gitlab-org/gitlab-foss/-/issues/31671






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux