git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Frank Paulo Filho <me@frankpf.com>
To: git@vger.kernel.org
Subject: Incorrect handling of interactive rebases with root flag
Date: Wed, 03 May 2017 19:55:27 -0300	[thread overview]
Message-ID: <1493852127.2480170.965025544.54B1448D@webmail.messagingengine.com> (raw)

If I run an interactive rebase on a branch without the --root flag, git
does not modify (change the hash, etc.) any initial commits that are
being "pick"ed in the same order. However, if I use --root, every single
commit is modified. 

Here's an example:

* Old (immediately after running "git rebase -i --root"):
    pick d89 root
    pick 3e7 bar
    pick 57e baz

* New (after editing the "git-rebase-todo" file):
    pick d89 root
    pick 57e baz
    pick 3e7 bar

After this, AFAIK, only baz and bar's hashes should change. However, the
root commit's hash (d89) also changes.

A simpler way to reproduce this is to just run `git rebase -i  --root`
and rebase without changing anything. Every commit will be modified.

Is this supposed to happen?

                 reply	other threads:[~2017-05-03 22:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1493852127.2480170.965025544.54B1448D@webmail.messagingengine.com \
    --to=me@frankpf.com \
    --cc=git@vger.kernel.org \
    /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).