git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit dropped when swapping commits with rebase -i -p
@ 2017-08-30 10:11 Sebastian Schuberth
  2017-08-30 18:07 ` Martin Ågren
  2017-08-30 20:28 ` Johannes Schindelin
  0 siblings, 2 replies; 12+ messages in thread
From: Sebastian Schuberth @ 2017-08-30 10:11 UTC (permalink / raw)
  To: git

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




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-17 13:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 10:11 Commit dropped when swapping commits with rebase -i -p Sebastian Schuberth
2017-08-30 18:07 ` 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

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 NNTP newsgroup(s).