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

Re: How to rebase when some commit hashes are in some commit messages

From
Jacob Keller <jacob.keller@gmail.com>
Date
Oct 13, 2015, 21:28 UTC
Message-ID
<CA+P7+xpgY-PGdxDKHBeu0X=U6FKMavzmjexUTWatUzEdw8CmcQ@mail.gmail.com>
In-Reply-To
<B846BC4FDE6944D39DC79E245264E544@PhilipOakley>
On Tue, Oct 13, 2015 at 12:24 PM, Philip Oakley <philipoakley@iee.org> wrote:
Show 11 quoted lines
> IIUC (as an alternate example),  in G4W one can submit a (long) pull request
> with internal back references that would be merged directly, so the sha1's
> could be updated as Francois-Xavier originally asked. I have a series that's
> been bumping along for a long while that needs regular rebasing, though
> doesn't have sha1 back references, so I can see that the need does happen. I
> can see that others may have a workflow that would work well with the sha1
> auto-update.
>
> --
> Philip
>

I still don't see how this is useful, because the part that *can* be implemented is not valuable and the part that is valuable can't be implemented.

So, what we can implement easily enough:

you rebase a series and any time the message contains sha1 of a commit we're modifying in this rebase, we update the sha1 to match again. This seems reasonable, but not useful. Why would you reference a commit that is *ITSELF* being rebased. No one has explained a reasonable use for this... I'm sure there exists one, but I would want an explanation of one first.

The "useful" case is if you rebase "onto" a tree that has a previous history that has been changed. In this case, how do you propose we find it. Doing as suggested above, ie: only changing sha1s that we are already rebasing works, but why are you backreferencing it if you are re-writing the commit? That doesn't make sense to me at all. Yes, you can do it, but I don't get why this is valuable. If you're backref is "fixes xyz" why not just fix xyz instead of have two commits. If the back ref has some other value... what is that value? I don't understand it I guess.

It just seems pretty narrow focus. I mean if someone wants to implement it, that is fine.

Regards, Jake

Previous: Philip OakleyNext: Philip Oakley
Message 9 of 17 in “How to rebase when some commit hashes are in some commit messages”
  1. Francois-Xavier Le BailOct 12, 2015
  2. Matthieu MoyOct 12, 2015
  3. Francois-Xavier Le BailOct 13, 2015
  4. Konstantin KhomoutovOct 13, 2015
  5. Philip OakleyOct 13, 2015
  6. Jacob KellerOct 13, 2015
  7. Mike RappazzoOct 13, 2015
  8. Philip OakleyOct 13, 2015
  9. Jacob KellerOct 13, 2015
  10. Philip OakleyOct 13, 2015
  11. Francois-Xavier Le BailOct 15, 2015
  12. Francois-Xavier Le BailOct 15, 2015
  13. Francois-Xavier Le BailOct 15, 2015
  14. Johannes SchindelinOct 15, 2015
  15. Philip OakleyOct 16, 2015
  16. Thomas KochOct 18, 2015
  17. Ævar Arnfjörð BjarmasonOct 18, 2015

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.