Re: git rebase: unexpected conflict

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git rebase: unexpected conflict

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:53

"Michael S. Tsirkin" [off-list ref] writes:
Sorry about being dense. What's evil there?
Sorry for being too terse to be useful.

An evil merge is a merge that introduces changes that do not
appear in any parent.
quoted hunk
There seems to have been a merge, and a conflict was resolved.

mst@mst-lt:~/scm/linux-2.6$ git show c45aa055c32b488fc3fd73c760df372b09acf69a
commit c45aa055c32b488fc3fd73c760df372b09acf69a
Merge: 784f4d5... 8dd851d...
Author: David Woodhouse [off-list ref]
Date:   Sun Oct 22 02:17:05 2006 +0100

    Merge git://git.infradead.org/~dwmw2/cafe-2.6

    Conflicts:

        drivers/mtd/nand/Kconfig

diff --cc drivers/mtd/nand/Kconfig
index b4b1656,5e97e63..564f79d
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@@ -219,6 -219,6 +219,13 @@@ config MTD_NAND_SHARPS
        tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
        depends on MTD_NAND && ARCH_PXA

++config MTD_NAND_CAFE
++       tristate "NAND support for OLPC CAFÉ chip"
++       depends on PCI
++       help
++       Use NAND flash attached to the CAFÉ chip designed for the $100
++       laptop.
++
  config MTD_NAND_CS553X
        tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
        depends on MTD_NAND && X86_32 && (X86_PC || X86_GENERICARCH)
Notice two plus letters?  The copy of the file in either
parents of the merge did not have these 7 lines.  These were
literally _added_ by the merge.

Since git-rebase currently ignores merge commits, while you are
rebasing your branch, your branch does not have these lines
after finishing to rebase the commit just before one.  The
commit that comes on top of this one _expects_ to have NAND_CAFE
already added in the tree, but since you do not have one, you
get a conflict.

Re: git rebase: unexpected conflict

From: Michael S. Tsirkin <hidden>
Date: 2016-06-15 22:42:53

Since git-rebase currently ignores merge commits
Ugh. This is the bit I did not know about.

So the following script is kind of equivalent to rebase -
it applies commits in range $1..$2 that touch files in list on top of current tree:

from=$1
shift
to=$1
shift
git-show --pretty=email `git-rev-list --no-merges $from..$to -- $* | tac` > box
../git-am box

And here I was hoping rebase will be smarter and help me out.

OK.

Questions about the above line now:

1. What is annoying in the above is that
git-show can not limit its output to just the part of patch
that affects the list of files I give, the way git-diff can.
Would such an extension be a good idea?

2. It's unfortunate that I need a temp file here.
Can git-am get stdin somehow?


-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help