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

Re: Feature request: Allow to update commit ID in messages when rebasing

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 19, 2019, 10:44 UTC
Message-ID
<86imvaz33v.fsf@gmail.com>
In-Reply-To
<CAGV3M55di4Nc_x25RoT0=dREkeCVc5_LpNabEjVDF+mSHK+0nQ@mail.gmail.com>
Hello,
Giuseppe Crinò <giuscri@gmail.com> writes:
> On Thu, Apr 18, 2019 at 7:32 PM Jakub Narebski <jnareb@gmail.com> wrote:
Show 15 quoted lines
>> Well, what about limiting changes and rewriting only to the commits
>> being rewritten by [interactive] rebase?  I mean that we would rewrite
>> "revert 01a9fe8" only if:
>>
>> a.) the commit with this message is undergoing rewrite
>> b.) the commit 01a9fe8 is undergoing rewrite in the same command
>>
>> We could use the infrastructure from git-filter-branch for this.
>>
>> It is serious limitation, but that might be good enough for Giuseppe
>> Crinò use case.
>
> In which case you need to change the ID of "revert 01a9fe8" _even if_
> 01a9fe8 is not involved in the rebase? Wouldn't be a solution to my
> use-case an already complete solution?

What I meant by "serious limitation" is that the condition a.) might mot hold true. You might be rebasing / rewriting the commit 01a9fe8, but there might be some commit not undergoing rewrite (for example one on a separate branch) that refers to the commit being rewritten, e.g. by including "revert 01a9fe8" in the commit message.

We also need to assume that the commit referred to (i.e. 01a9fe8) is being rewritten earlier in sequence than referring commit (i.e. one with "revert 01a9fe8").

Regards, -- Jakub Narębski

Previous: Giuseppe Crinò
Message 7 of 7 in “Feature request: Allow to update commit ID in messages when rebasing”
  1. Giuseppe CrinòApr 17, 2019
  2. Ævar Arnfjörð BjarmasonApr 17, 2019
  3. Junio C HamanoApr 18, 2019
  4. Jakub NarebskiApr 18, 2019
  5. Phil HordApr 18, 2019
  6. Giuseppe CrinòApr 18, 2019
  7. Jakub NarebskiApr 19, 2019

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.