git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2023, 22:25 UTC
Message-ID
<xmqqa5zxn85r.fsf@gitster.g>
In-Reply-To
<210376fb-f830-4883-b576-2936dabc09cc@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:
Show 16 quoted lines
> On Thu, Mar 23, 2023, at 17:22, Oswald Buddenhagen wrote:
>> Instead of generating a silly-looking `Revert "Revert "foo""`, make it
>> `Reapply "foo"`.
>
> Nice addition.
>
>     $ echo change >> README.md
>     $ ./bin-wrappers/git add README.md
>     $ ./bin-wrappers/git commit -m 'A change'
>     $ ./bin-wrappers/git revert --no-edit @
>     $ ./bin-wrappers/git revert --no-edit @
>     $ ./bin-wrappers/git log --oneline master..
>     adfce56c6a (HEAD -> reapply) Reapply "A change"
>     395894c2ce Revert "A change"
>     a01e3d6b3d A change
>     058643b69f sequencer: beautify subject of reverts of reverts

I think Oswald saw the end of a thread a few years ago that discussed a similar idea and the patch is a continuation of that thread, but what should happen when the re-application turns out to be bad?

The significance of the act of reverting such a reapplication to the project would be different from the initial revert (where "yikes, the change introduces a regression---let's revert to the state before the change, regroup, and see what we should do" was the motivation). Somebody thought that it now was OK to reintroduce the change, presumably because the code paths around it now have become ready for it and the phrase "Reapply" makes a perfect sense to describe it ("Revert an earlier revert" is not too bad, either, though). But then it turns out it still was a bad idea. Should we say

    Revert Reapply "A change"

Next time somebody thinks the code paths around there are finally ready, do they do

    Reapply Reapply "A change"

or something else? That may be shorter, but even more cryptic than 'Revert Revert Revert Revert "A change"'---"Revert^4 "A change"" the other thread proposed start to look less horrible. So, I dunno.

Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 3 of 8 in “sequencer: beautify subject of reverts of reverts”
  1. sequencer: beautify subject of reverts of revertsOswald Buddenhagen, Mar 23, 2023
  2. Kristoffer HaugsbakkMar 25, 2023
  3. Junio C HamanoMar 27, 2023
  4. Kristoffer HaugsbakkMar 28, 2023
  5. Oswald BuddenhagenMar 28, 2023
  6. Kristoffer HaugsbakkMar 28, 2023
  7. Junio C HamanoMar 28, 2023
  8. Junio C HamanoMar 28, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.