git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Giuseppe Crinò" <giuscri@gmail.com>,
	git@vger.kernel.org, "Jakub Narebski" <jnareb@gmail.com>
Subject: Re: Feature request: Allow to update commit ID in messages when rebasing
Date: Thu, 18 Apr 2019 11:08:51 +0900	[thread overview]
Message-ID: <xmqqtvewgj4c.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <878sw8bbby.fsf@evledraar.gmail.com> (=?utf-8?B?IsOGdmFyIEFy?= =?utf-8?B?bmZqw7Zyw7A=?= Bjarmason"'s message of "Wed, 17 Apr 2019 22:56:01 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Wed, Apr 17 2019, Giuseppe Crinò wrote:
>
>> 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/

That's a helpful input.

But in general we do not have an infrastructure to systematically
keep track of "this commit was rewritten to produce that other
commit", so even if a mention of an old/superseded commit can be
identified reliably, there is no reliable source to rewrite it to
the name of the corresponding commit in the new world.

For that mapping, we'd need something like the "git change/evolve"
Stefan Xenos was working on, which hasn't materialized.


  reply	other threads:[~2019-04-18  2:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 20:35 Giuseppe Crinò
2019-04-17 20:56 ` Ævar Arnfjörð Bjarmason
2019-04-18  2:08   ` Junio C Hamano [this message]
2019-04-18 17:32     ` Jakub Narebski
2019-04-18 17:58       ` Giuseppe Crinò
2019-04-19 10:44         ` Jakub Narebski
2019-04-18 18:00       ` Phil Hord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtvewgj4c.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=giuscri@gmail.com \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).