git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Subject: Commit dropped when swapping commits with rebase -i -p
Date: Wed, 30 Aug 2017 12:11:14 +0200	[thread overview]
Message-ID: <oo62vr$pvq$1@blaine.gmane.org> (raw)

Hi,

I believe stumbled upon a nasty bug in Git: It looks like a commits gets dropped during interactive rebase when asking to preserve merges. Steps:

$ git clone -b git-bug --single-branch https://github.com/heremaps/scancode-toolkit.git
$ git rebase -i -p HEAD~2
# In the editor, swap the order of the two (non-merge) commits.
$ git diff origin/git-bug

The last command will show a non-empty diff which looks as if the "Do not shadow the os package with a variable name" commit has been dropped, and indeed "git log" confirms this. The commit should not get dropped, and it does not if just using "git rebase -i -p HEAD~2" (without "-p").

I'm observing this with Git 2.14.1 on Linux.

Regards,
Sebastian




             reply	other threads:[~2017-08-30 10:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 10:11 Sebastian Schuberth [this message]
2017-08-30 18:07 ` Commit dropped when swapping commits with rebase -i -p Martin Ågren
2017-08-30 18:59   ` Sebastian Schuberth
2017-09-02  0:04     ` Jonathan Nieder
2017-09-11  8:45       ` Sebastian Schuberth
2017-09-15 20:52         ` Junio C Hamano
2017-09-16 10:41           ` Andreas Heiduk
2017-09-16 13:45             ` Sebastian Schuberth
2017-09-17 13:31               ` Phillip Wood
2017-08-30 20:28 ` Johannes Schindelin
2017-08-30 20:48   ` Sebastian Schuberth
2017-09-01 19:16     ` Johannes Schindelin

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='oo62vr$pvq$1@blaine.gmane.org' \
    --to=sschuberth@gmail.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).