git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: minor interactive rebase regression: HEAD points to wrong commit while rewording
Date: Mon, 12 Aug 2019 11:17:01 -0700	[thread overview]
Message-ID: <xmqqsgq69rky.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190812175046.GM20404@szeder.dev> ("SZEDER Gábor"'s message of "Mon, 12 Aug 2019 19:50:46 +0200")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> ...
> So far so good.
> Save the updated commit message, and after the editor opens up the
> third commit's log message, check again where HEAD is pointing to now:
>
>   ~/tmp/reword (master +|REBASE-i 2/3)$ head -n1 .git/COMMIT_EDITMSG 
>   third
>   ~/tmp/reword (master +|REBASE-i 2/3)$ git log --oneline -1
>   c3db735 (HEAD) second - updated
>
> As you can see, HEAD still points to the (now rewritten) second
> commit.
>
> It's only HEAD,...

Yuck.

That would still be annoying to some people and outright buggy to
others, if their workflow relies on HEAD (e.g. compare with HEAD
while reviewing the log messsage) and then now they instead need to
adjust (e.g. compare with the index instead).  Perhaps you are one
of them (apparently I am not, as I did not notice the behaviour
change until you pointed it out here).


  reply	other threads:[~2019-08-12 18:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 17:50 minor interactive rebase regression: HEAD points to wrong commit while rewording SZEDER Gábor
2019-08-12 18:17 ` Junio C Hamano [this message]
2019-08-12 18:56   ` SZEDER Gábor
2019-08-12 20:28 ` Phillip Wood
2019-08-14 20:45   ` Johannes Schindelin
2019-08-14 21:40     ` SZEDER Gábor
2019-08-14 21:20   ` SZEDER Gábor
2019-08-15 13:47     ` Phillip Wood
2019-08-15 16:36       ` Junio C Hamano
2019-08-15 16:54         ` Junio C Hamano

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=xmqqsgq69rky.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=szeder.dev@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 public 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).