Skip to contentSkip to conversation

Merging on a dirty tree???

DISCUSSION Dmitry Torokhov 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I just tried to pull from Linus' tree into my local tree and it seems that fast forward was committed even though the tree was dirty:

...
drivers/media/video/cx88/cx88-input.c: needs update drivers/media/video/ir-kbd-i2c.c: needs update drivers/media/video/saa7134/saa7134-input.c: needs update include/linux/device.h: needs update include/linux/input.h: needs update
fatal: Entry 'drivers/base/core.c' not uptodate. Cannot merge.

 Makefile                                |    4 +-
 arch/i386/kernel/nmi.c                  |    8 ----
 arch/x86_64/kernel/nmi.c                |    5 +--
 drivers/base/core.c                     |   29 ++++++++++++++
 drivers/hid/hid-core.c                  |   20 ++++-----
 drivers/net/natsemi.c                   |   58 +++++++++++++++-------------
 drivers/net/netxen/netxen_nic.h         |    1 +
 drivers/net/netxen/netxen_nic_ethtool.c |    1 +
 drivers/net/netxen/netxen_nic_hw.c      |    5 ++-
 drivers/net/netxen/netxen_nic_init.c    |   11 ++++-
 drivers/net/skge.c                      |   28 ++++++++-----
 drivers/s390/cio/ccwgroup.c             |   18 +++++++-
 drivers/scsi/scsi_sysfs.c               |   14 ++++++-
 fs/sysfs/file.c                         |   64 ++++++++++++++++++++++++++++--
 fs/sysfs/inode.c                        |   10 +++-
 include/asm-i386/nmi.h                  |    2 +-
 include/asm-x86_64/nmi.h                |    2 +-
 include/linux/device.h                  |    2 +
 include/linux/sysfs.h                   |    9 ++++
 19 files changed, 211 insertions(+), 80 deletions(-)

[dtor@anvil work]$ git --version
git version 1.5.0.3.438.gc49b2

It used to refuse merge if there were conflicts...

Signature · 1 line
Dmitry
#1 lore raw
Quoted 4 lines · Dmitry Torokhov

Hi,

I just tried to pull from Linus' tree into my local tree and it seems that fast forward was committed even though the tree was dirty:

[...]

Quoted 5 lines
 19 files changed, 211 insertions(+), 80 deletions(-)

[dtor@anvil work]$ git --version
git version 1.5.0.3.438.gc49b2

It used to refuse merge if there were conflicts...

Try with this patch.

Santi

-- >8 --
From: "Santi Béjar" <[email protected]>
Subject: [PATCH] git-merge: finish when git-read-tree fails

The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain.

Noticed by Dmitry Torokhov.

---
 git-merge.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
git-merge.sh +2 -2
index 6ce62c8..8759c5a 100755
@@ -292,13 +292,13 @@ f,*)
 	# Again the most common case of merging one remote.
 	echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $1)"
 	git-update-index --refresh 2>/dev/null
-	new_head=$(git-rev-parse --verify "$1^0") &&
-	git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
 	msg="Fast forward"
 	if test -n "$have_message"
 	then
 		msg="$msg (no commit created; -m option ignored)"
 	fi
+	new_head=$(git-rev-parse --verify "$1^0") &&
+	git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
 	finish "$new_head" "$msg" || exit
 	dropsave
 	exit 0
Signature · 1 line
1.5.0.4.1010.g688e
#2 lore raw
Quoted 8 lines · Santi Béjar

From: "Santi Béjar" <[email protected]>
Subject: [PATCH] git-merge: finish when git-read-tree fails

The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain.

Noticed by Dmitry Torokhov.

Gaah. Thanks, well spotted.

That makes v1.5.0.4 a dud.