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

git rebase: unexpected conflict

From
MTMichael S. Tsirkin <mst@mellanox.co.il>
Date
Feb 4, 2007, 19:05 UTC
Message-ID
<20070204190519.GB29029@mellanox.co.il>
git rebase seems to see conflicts where there shouldn't be any.
Example: I have a tree here:
git://git/openfabrics.org/~vlad/ofed_1_2/.git

and have efedfe57a21a134a65d951bcca73af46da609c5e checked out (I think it moved since, but you can create a branch if you like).

This is tree from Linus + some extra drivers added
(it's large (as kernel trees often are), so use
 Linus' tree as a reference if you want to clone it).

Now, I decided I don't like 9b3bfe5696aa417d38ce903eb345a03d65743dd2, and since no one is likely to have a clone of this tree, it should be OK to remove it from history with git rebase.

So I did:
git-rebase --onto 9b3bfe5696aa417d38ce903eb345a03d65743dd2~1 \
		9b3bfe5696aa417d38ce903eb345a03d65743dd2
and it starts replaying the changes I pulled from Linus' tree:

-------------------------- First, rewinding head to replay your work on top of it... HEAD is now at 6cc583d... IB/sdp: allow users via module parameter to bound SDP's memory use

Applying '[JFFS2] kill warning RE debug-only variables'
Wrote tree 3a03db80ed42fda246e5e8420699e22cdd6fff89
Committed: c0427b1c39aeb86ea7b97a25ed7b623ac563b516
Applying '[MTD NAND] Initial import of CAFÉ NAND driver.'
Adds trailing whitespace.
.dotest/patch:44:/*
Adds trailing whitespace.
.dotest/patch:93:
Adds trailing whitespace.
.dotest/patch:225:              /* Ignore the first command of a pair; the hardware
Adds trailing whitespace.
.dotest/patch:242:      dev_dbg(&cafe->pdev->dev, "dlen %x, ctl1 %x, ctl2 %x\n",
Adds trailing whitespace.
.dotest/patch:507:
warning: squelched 2 whitespace errors
warning: 7 lines add trailing whitespaces.
Wrote tree 18cdff711481cdb4c495a846a7776203198dfc87
Committed: 4cfaf4dd2573cd695603f31c404f3b66e1515487
Applying '[MTD] SSFDC must depend on BLOCK'
Wrote tree c91cb50928089c0968d40a14432085db58b12614
Committed: 60a9aa8868bab0821b8cdb05f711e7a812584800
Applying '[MTD NAND] OLPC CAFÉ driver update'
Adds trailing whitespace.
.dotest/patch:119:      cafe_dev_dbg(&cafe->pdev->dev, "dlen %x, ctl1 %x, ctl2 %x\n",
Adds trailing whitespace.
.dotest/patch:198:/* Ick. The BBT code really ought to be able to work this bit out
warning: 2 lines add trailing whitespaces.
Wrote tree 3c7c72650eea2c613569ca51bc47775beca984c9
Committed: fc6406731b3fe302d630317593483fbde9abe8d4
Applying '[MTD] MAPS: Add parameter to amd76xrom to override rom window size'
Wrote tree ae4567223d6b8ed5408ca0b63611b0f7962589aa
Committed: c4f773a7476520b5459ddbb83df5fe143eec4626
Applying '[MTD] CHIPS: Support for SST 49LF040B flash chip'
Wrote tree c5038d0ec22dbc4ba571c9a82697a43f8dd2bd9b
Committed: f19c8f26bc9849531b28d48430c09e0359976a3e
Applying '[MTD] MAPS: Support for BIOS flash chips on Intel ESB2 southbridge'
Wrote tree 169159ae4017bc3838a01ad737fae53efa150a09
Committed: c6ec7ab7ef424713c6bf62fa436b95912c18db3a
Applying '[JFFS2] Use rb_first() and rb_last() cleanup'
Wrote tree 53862b25b4bbd4c7e57cc893025545ce235eb1b8
Committed: 0f45697d933b9db1edae3cac0a59284cdae5656f
Applying '[MTD] JEDEC probe: fix comment typo (devic)'
Wrote tree 82173259dd1c133e7f9c5879fd096ba658f69cb4
Committed: 2119a3d1d4af4bfbcb72494b994ce52d0d6ad08b
Applying '[MTD] MAPS: esb2rom: use hotplug safe interfaces'
Wrote tree cab550abb9f4d577243bb6492706922c58cd9a44
Committed: 4d7f42ad97194199da7ad4ec0ae80ce5399b7554
Applying '[JFFS2] Fix jffs2_follow_link() typo'
Wrote tree fe9d6afb990115817aae90716640e5588c79c7c6
Committed: 29cd2f5afa2aa8a8ea7842437f6cdd534605a70e
Applying '[MTD] NAND: AT91 NAND driver'
error: patch failed: drivers/mtd/nand/Kconfig:232
error: drivers/mtd/nand/Kconfig: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
 100% (22053/22053) done
Auto-merged drivers/mtd/nand/Kconfig
CONFLICT (content): Merge conflict in drivers/mtd/nand/Kconfig
Auto-merged drivers/mtd/nand/Makefile
Failed to merge in the changes.
Patch failed at 0012.

When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". --------------------------

Sure enough, there are conflicts in drivers/mtd/nand/Kconfig:
<<<<<<< HEAD:drivers/mtd/nand/Kconfig
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_AT91
        bool "Support for NAND Flash / SmartMedia on AT91"
        depends on MTD_NAND && ARCH_AT91
        help
          Enables support for NAND Flash / Smart Media Card interface
          on Atmel AT91 processors.
>>>>>>> [MTD] NAND: AT91 NAND driver:drivers/mtd/nand/Kconfig

But I don't really understand where do the conflicts come from: The patch I skipped (9b3bfe5696aa417d38ce903eb345a03d65743dd2) only touched the file drivers/infiniband/core/addr.c, so why can't rebase replay all of the changes?

-- 
MST
Next: Jakub Narebski
Message 1 of 16 in “git rebase: unexpected conflict”
  1. Michael S. TsirkinFeb 4, 2007
  2. Jakub NarebskiFeb 4, 2007
  3. Michael S. TsirkinFeb 4, 2007
  4. Junio C HamanoFeb 7, 2007
  5. Michael S. TsirkinFeb 7, 2007
  6. Junio C HamanoFeb 7, 2007
  7. Michael S. TsirkinFeb 7, 2007
  8. Junio C HamanoFeb 7, 2007
  9. Michael S. TsirkinFeb 7, 2007
  10. Junio C HamanoFeb 7, 2007
  11. Michael S. TsirkinFeb 8, 2007
  12. Junio C HamanoFeb 8, 2007
  13. Michael S. TsirkinFeb 8, 2007
  14. Michael S. TsirkinFeb 9, 2007
  15. Linus TorvaldsFeb 7, 2007
  16. Linus TorvaldsFeb 7, 2007

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.