git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Disappearing change on pull rebase

From
PIPitucha, Stanislaw Izaak <stanislaw.pitucha@hp.com>
Date
Nov 10, 2011, 13:35 UTC
Message-ID
<3FF1328CB05DB74898F769F1BA17812C3E49B74699@GVW1348EXA.americas.hpqcorp.net>
In-Reply-To
<B5934593-5EE9-4A9F-96D5-0E36B696EFBD@jetbrains.com>
As mentioned in the original mail - the merge commit did have changes. Here's the log of reproducing it. The line containing "2" in changelog is gone from master after pull --rebase.
$ git init fake_upstream
Initialized empty Git repository in /tmp/fake_upstream/.git/
$ cd fake_upstream/ 
fake_upstream$ echo some_content > test
fake_upstream$ echo 1 > changelog
fake_upstream$ git add test changelog 
fake_upstream$ git commit -m 'first commit'
[master (root-commit) b1b683d] first commit
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 changelog
 create mode 100644 test
fake_upstream$ cd ..
$ git clone /tmp/fake_upstream/ disappearing_commit
Cloning into disappearing_commit...
done.
$ cd disappearing_commit/
disappearing_commit$ git checkout -b some-branch
Switched to a new branch 'some-branch'
disappearing_commit$ echo blah >> test
disappearing_commit$ git commit test -m 'branch modification'
[some-branch 528f166] branch modification
 1 files changed, 1 insertions(+), 0 deletions(-)
disappearing_commit$ git checkout master
Switched to branch 'master'

disappearing_commit$ git merge --no-ff --no-commit some-branch Automatic merge went well; stopped before committing as requested disappearing_commit$ echo 2 >> changelog disappearing_commit$ git add changelog disappearing_commit$ git commit [master e41e4c9] Merge branch 'some-branch'

disappearing_commit$ git show
commit e41e4c963a72528e3b2b5945ca419e19cdba1e4b
Merge: b1b683d 528f166
Author: Stanislaw Pitucha <stanislaw.pitucha@hp.com>
Date:   Thu Nov 10 13:30:04 2011 +0000
    Merge branch 'some-branch'

diff --cc changelog index d00491f,d00491f..1191247

--- a/changelog
+++ b/changelog
@@@ -1,1 -1,1 +1,2 @@@
  1
++2
disappearing_commit$ git pull --rebase
First, rewinding head to replay your work on top of it...
Applying: branch modification
disappearing_commit$ git show
commit ef8f5e40db9fe7efbd4e493ff68b12327acde283
Author: Stanislaw Pitucha <stanislaw.pitucha@hp.com>
Date:   Thu Nov 10 13:29:33 2011 +0000

    branch modification

diff --git a/test b/test
index 6e099dc..2f3f685 100644
--- a/test
+++ b/test
@@ -1 +1,2 @@
 some_content
+blah


Regards,
Stanisław Pitucha
Cloud Services 
Hewlett Packard
Previous: Kirill LikhodedovNext: Johannes Sixt
Message 3 of 8 in “Disappearing change on pull rebase”
  1. Pitucha, Stanislaw IzaakNov 10, 2011
  2. Kirill LikhodedovNov 10, 2011
  3. Pitucha, Stanislaw IzaakNov 10, 2011
  4. Johannes SixtNov 11, 2011
  5. Philippe VaucherNov 11, 2011
  6. Johannes SixtNov 11, 2011
  7. Philippe VaucherNov 11, 2011
  8. Junio C HamanoNov 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.