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
TKThomas Koch <thomas@koch.ro>
Date
Oct 18, 2015, 13:58 UTC
Message-ID
<1634617.ZbHCyji7nE@x121e>
In-Reply-To
<561F597B.8090102@orange.fr>
On Thursday 15 October 2015 09:44:59 Francois-Xavier Le Bail wrote:
Show 10 quoted lines
> >> On Tue, 13 Oct 2015 10:50:40 +0200
> >> Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> wrote:
> >>> >> For example, if I rebase the following commits, I would want that
> >>> >> if the commit hash 2222222... become 7777777...,
> >>> >> the message
> >>> >> "Update test output for 2222222222222222222222222222222222222222"
> >>> >> become
> >>> >> "Update test output for 7777777..."
> >>> >> 
> >>> >> Is it possible currently? And if yes how?

The code review system Gerrit (highly recommended!) uses a commit-hook to adds a trailer line to every commit message, e.g.:

Change-Id: Id8269a1aa4a2c7a1a584b23b01d63259410c4e85

This Change-Id is used to identify a change even if the change gets amended or rebased and thus is represented in a different commit.

So if you're using Gerrit you can refer to changes instead of commits and use the Change-Id. Even if you don't use Gerrit you can still use its commit-hook to write the Change-Id trailers.

Regards,
Thomas Koch
Previous: Philip OakleyNext: Ævar Arnfjörð Bjarmason
Message 16 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.