Re: [PATCH v2] sequencer: beautify subject of reverts of reverts

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> It is better for a code to behave
> in a dumb but explainable way, than to attempting and failing to act
> too clever for its own worth.

I completely agree.

> Oswald, I do not think GIGO is really an excuse in this case, when
> the only value of the topic is to make the behaviour less awkward by
> creating something better than a repeated revert-revert sequence,
> revert-reapply-revert is worse, as it is markedly harder to guess
> what it really means for a reversion of revert-revert-revert than
> "revert" repeated four times. 

How about introducing a suffix (+ or -) after the word "Revert" to
indicate the application/inclusion (+) or removal (-) of a commit? Example:

    - "foo: bar baz quux"
    - Revert "foo: bar baz quux"
    - Revert(+) Revert(-) "foo: bar baz quux"
    - Revert(-) Revert(+) Revert(-) "foo: bar baz quux"
    - Revert(+) Revert(-) Revert(+) Revert(-) "foo: bar baz quux"

I think the above increases readability. I chose to keep the same style
as the status quo for the first revert, because the "(-)" suffix alone
without a neighboring "(+)", as in

    Revert(-) "foo: bar baz quux"

might confuse users. This style would also do away with the multiple
quoting levels that make the current multi-revert subject lines look
messy at the end. Example:

    Revert "Revert "Revert "Revert some subject"""
                                                ^
                                                This part is starting to
                                                become noisy.

(Sorry for jumping into this thread so late, but the mention of this
topic on the recent "What's cooking" message [1] (that this topic would
be discarded) got me interested.)

[1] https://lore.kernel.org/git/xmqqpm4d9g54.fsf@gitster.g/T/#mf4edccc7bbc6365a03eaf106121694a27559d275



[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