Re: [PATCH] revert: optionally refer to commit in the "reference" format

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> AFAICT all of the goals you're suggesting here will be even better if
> it's commented out, then you will need to edit it, and we'll error out
> by default if you don't. Why not use that?

Simply because I doubt that would work.  Doesn't the stripspace on
the log message with unedited comments simply discard the commented
out part and results in a title that is taken from the line that
happens to end up being the first non-blank-non-commented-out line?

> The subject you're replacing isn't content-free, it at least includes
> the OID, this one doesn't, so you won't see it in --oneline. That's less
> useful.

I know.  That is the point; those who choose to use --reference want
to make sure they want to edit out the line that tell them to edit.

>
>> If we leave something like
>>
>> 	# Add one line above and explain not *what* this revert did,
>> 	# but *why* you decided to revert in 50-70 chars.  Did it
>> 	# break something? Was it premature?
>>
>> 	This reverts commit 8aa3f0dc (CI: set CC in MAKEFLAGS directly, 2022-04-21)
>>
>> presumably, stripspace will make the "This reverts commit ..." the
>> title of the reverted commit.  It would invite people not to edit it
>> out out of laziness.  Since the whole point of this change is to
>> encourage people to describe the reason behind the revert on the
>> subject line, such an invitation is counter-productive.
>
> If that's the concern we could also comment the "This reverts" line.

That punishes the normal use case where the title is edited and the
body is used to start the message as-is.





[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