Re: Feature request: Allow to update commit ID in messages when rebasing
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 17, 2019, 20:56 UTC
- Message-ID
- <878sw8bbby.fsf@evledraar.gmail.com>
- In-Reply-To
- <CAGV3M54XhRMDXdhbfTon5nRV59VOjw8W4YrNP63TqPYm8pxd8Q@mail.gmail.com>
On Wed, Apr 17 2019, Giuseppe Crinò wrote:
Show 12 quoted lines
> The feature I'm asking is to add an extra-step during rebasing, > checking whether there's a reference to a commit that's not going to > be included in history and asks the user whether the heuristics is > correct and if she wants to update those references. > > Scenario: it can happen for a commit message to contain the ID of an > ancestor commit. A typical example is a commit with the message > "revert 01a9fe8". If 01a9fe8 and the commit that reverts it are > involved in a rebase the message "revert 01a9fe8" is no longer valid > -- the old 01a9fe8 has now a different hash. This will most likely be > ignored by the person who's rebasing but will let the other people > reading history confused.
This would be useful. Done properly we'd need some machinery/command to extract the commit id parts from the free-text of the commit message. That would be useful for other parts of git, e.g. as discussed here: https://public-inbox.org/git/xmqqvaxp9oyp.fsf@gitster.mtv.corp.google.com/