{"thread":{"id":"6679","subject":"git rebase: unexpected conflict","startedAt":"2007-02-04T19:05:19Z","lastAt":"2007-02-09T10:23:23Z","messageCount":16,"participants":["Michael S. Tsirkin","Jakub Narebski","Junio C Hamano","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"33581","messageId":"20070204190519.GB29029@mellanox.co.il","threadId":"6679","inReplyTo":null,"subject":"git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-04T19:05:19Z","receivedAt":"2007-02-04T19:05:19Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"git rebase seems to see conflicts where there shouldn't be any.\n\nExample: I have a tree here:\n\ngit://git/openfabrics.org/~vlad/ofed_1_2/.git\n\nand have efedfe57a21a134a65d951bcca73af46da609c5e\nchecked out (I think it moved since, but you can create\na branch if you like).\n\nThis is tree from Linus + some extra drivers added\n(it's large (as kernel trees often are), so use\n Linus' tree as a reference if you want to clone it).\n\nNow, I decided I don't like 9b3bfe5696aa417d38ce903eb345a03d65743dd2,\nand since no one is likely to have a clone of this tree,\nit should be OK to remove it from history with git rebase.\n\nSo I did:\n\ngit-rebase --onto 9b3bfe5696aa417d38ce903eb345a03d65743dd2~1 \\\n\t\t9b3bfe5696aa417d38ce903eb345a03d65743dd2\n\nand it starts replaying the changes I pulled from Linus' tree:\n\n--------------------------\nFirst, rewinding head to replay your work on top of it...\nHEAD is now at 6cc583d... IB/sdp: allow users via module parameter to bound SDP's memory use\n\nApplying '[JFFS2] kill warning RE debug-only variables'\n\nWrote tree 3a03db80ed42fda246e5e8420699e22cdd6fff89\nCommitted: c0427b1c39aeb86ea7b97a25ed7b623ac563b516\n\nApplying '[MTD NAND] Initial import of CAFÉ NAND driver.'\n\nAdds trailing whitespace.\n.dotest/patch:44:/*\nAdds trailing whitespace.\n.dotest/patch:93:\nAdds trailing whitespace.\n.dotest/patch:225:              /* Ignore the first command of a pair; the hardware\nAdds trailing whitespace.\n.dotest/patch:242:      dev_dbg(&cafe->pdev->dev, \"dlen %x, ctl1 %x, ctl2 %x\\n\",\nAdds trailing whitespace.\n.dotest/patch:507:\nwarning: squelched 2 whitespace errors\nwarning: 7 lines add trailing whitespaces.\nWrote tree 18cdff711481cdb4c495a846a7776203198dfc87\nCommitted: 4cfaf4dd2573cd695603f31c404f3b66e1515487\n\nApplying '[MTD] SSFDC must depend on BLOCK'\n\nWrote tree c91cb50928089c0968d40a14432085db58b12614\nCommitted: 60a9aa8868bab0821b8cdb05f711e7a812584800\n\nApplying '[MTD NAND] OLPC CAFÉ driver update'\n\nAdds trailing whitespace.\n.dotest/patch:119:      cafe_dev_dbg(&cafe->pdev->dev, \"dlen %x, ctl1 %x, ctl2 %x\\n\",\nAdds trailing whitespace.\n.dotest/patch:198:/* Ick. The BBT code really ought to be able to work this bit out\nwarning: 2 lines add trailing whitespaces.\nWrote tree 3c7c72650eea2c613569ca51bc47775beca984c9\nCommitted: fc6406731b3fe302d630317593483fbde9abe8d4\n\nApplying '[MTD] MAPS: Add parameter to amd76xrom to override rom window size'\n\nWrote tree ae4567223d6b8ed5408ca0b63611b0f7962589aa\nCommitted: c4f773a7476520b5459ddbb83df5fe143eec4626\n\nApplying '[MTD] CHIPS: Support for SST 49LF040B flash chip'\n\nWrote tree c5038d0ec22dbc4ba571c9a82697a43f8dd2bd9b\nCommitted: f19c8f26bc9849531b28d48430c09e0359976a3e\n\nApplying '[MTD] MAPS: Support for BIOS flash chips on Intel ESB2 southbridge'\n\nWrote tree 169159ae4017bc3838a01ad737fae53efa150a09\nCommitted: c6ec7ab7ef424713c6bf62fa436b95912c18db3a\n\nApplying '[JFFS2] Use rb_first() and rb_last() cleanup'\n\nWrote tree 53862b25b4bbd4c7e57cc893025545ce235eb1b8\nCommitted: 0f45697d933b9db1edae3cac0a59284cdae5656f\n\nApplying '[MTD] JEDEC probe: fix comment typo (devic)'\n\nWrote tree 82173259dd1c133e7f9c5879fd096ba658f69cb4\nCommitted: 2119a3d1d4af4bfbcb72494b994ce52d0d6ad08b\n\nApplying '[MTD] MAPS: esb2rom: use hotplug safe interfaces'\n\nWrote tree cab550abb9f4d577243bb6492706922c58cd9a44\nCommitted: 4d7f42ad97194199da7ad4ec0ae80ce5399b7554\n\nApplying '[JFFS2] Fix jffs2_follow_link() typo'\n\nWrote tree fe9d6afb990115817aae90716640e5588c79c7c6\nCommitted: 29cd2f5afa2aa8a8ea7842437f6cdd534605a70e\n\nApplying '[MTD] NAND: AT91 NAND driver'\n\nerror: patch failed: drivers/mtd/nand/Kconfig:232\nerror: drivers/mtd/nand/Kconfig: patch does not apply\nUsing index info to reconstruct a base tree...\nFalling back to patching base and 3-way merge...\n 100% (22053/22053) done\nAuto-merged drivers/mtd/nand/Kconfig\nCONFLICT (content): Merge conflict in drivers/mtd/nand/Kconfig\nAuto-merged drivers/mtd/nand/Makefile\nFailed to merge in the changes.\nPatch failed at 0012.\n\nWhen you have resolved this problem run \"git rebase --continue\".\nIf you would prefer to skip this patch, instead run \"git rebase --skip\".\nTo restore the original branch and stop rebasing run \"git rebase --abort\".\n--------------------------\n\nSure enough, there are conflicts in drivers/mtd/nand/Kconfig:\n\n<<<<<<< HEAD:drivers/mtd/nand/Kconfig\nconfig MTD_NAND_CAFE\n       tristate \"NAND support for OLPC CAFÉ chip\"\n       depends on PCI\n       help\n         Use NAND flash attached to the CAFÉ chip designed for the $100\n         laptop.\n=======\nconfig MTD_NAND_AT91\n        bool \"Support for NAND Flash / SmartMedia on AT91\"\n        depends on MTD_NAND && ARCH_AT91\n        help\n          Enables support for NAND Flash / Smart Media Card interface\n          on Atmel AT91 processors.\n>>>>>>> [MTD] NAND: AT91 NAND driver:drivers/mtd/nand/Kconfig\n\nBut I don't really understand where do the conflicts come from:\nThe patch I skipped (9b3bfe5696aa417d38ce903eb345a03d65743dd2)\nonly touched the file drivers/infiniband/core/addr.c,\nso why can't rebase replay all of the changes?\n\n-- \nMST\n"},{"id":"33583","messageId":"eq5cc6$al2$1@sea.gmane.org","threadId":"6679","inReplyTo":"20070204190519.GB29029@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-04T19:33:50Z","receivedAt":"2007-02-04T19:33:50Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Michael S. Tsirkin wrote:\n\n> git rebase seems to see conflicts where there shouldn't be any.\n\nWere you on a branch that you wanted to rebase? I had made this error once.\ngit rebase --onto <newbase> <upstream> <branch> moves <upstream>..<branch>\ninto <newbase>.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"33589","messageId":"20070204205341.GD29029@mellanox.co.il","threadId":"6679","inReplyTo":"eq5cc6$al2$1@sea.gmane.org","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-04T20:53:41Z","receivedAt":"2007-02-04T20:53:41Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Jakub Narebski <jnareb@gmail.com>:\n> Subject: Re: git rebase: unexpected conflict\n> \n> Michael S. Tsirkin wrote:\n> \n> > git rebase seems to see conflicts where there shouldn't be any.\n> \n> Were you on a branch that you wanted to rebase?\n\nYes: I did not specify the <branch> parameter at all.\nHowever note that there were merges since the commit\nthat I wanted to skip.\n\n> I had made this error once.\n> git rebase --onto <newbase> <upstream> <branch> moves <upstream>..<branch>\n> into <newbase>.\n\nI really just did\ngit-rebase --onto $1~1 $1\n\nand the commit I gave 9b3bfe5696aa417d38ce903eb345a03d65743dd2\nactually as a parent of the current branch.\n\n\n-- \nMST\n"},{"id":"33835","messageId":"7vr6t17ohb.fsf@assigned-by-dhcp.cox.net","threadId":"6679","inReplyTo":"20070204190519.GB29029@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-07T19:32:32Z","receivedAt":"2007-02-07T19:32:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n\n> When you have resolved this problem run \"git rebase --continue\".\n> If you would prefer to skip this patch, instead run \"git rebase --skip\".\n> To restore the original branch and stop rebasing run \"git rebase --abort\".\n> --------------------------\n>\n> Sure enough, there are conflicts in drivers/mtd/nand/Kconfig:\n>\n> <<<<<<< HEAD:drivers/mtd/nand/Kconfig\n> config MTD_NAND_CAFE\n>        tristate \"NAND support for OLPC CAFÉ chip\"\n>        depends on PCI\n>        help\n>          Use NAND flash attached to the CAFÉ chip designed for the $100\n>          laptop.\n> =======\n> config MTD_NAND_AT91\n>         bool \"Support for NAND Flash / SmartMedia on AT91\"\n>         depends on MTD_NAND && ARCH_AT91\n>         help\n>           Enables support for NAND Flash / Smart Media Card interface\n>           on Atmel AT91 processors.\n>>>>>>>> [MTD] NAND: AT91 NAND driver:drivers/mtd/nand/Kconfig\n>\n> But I don't really understand where do the conflicts come from:\n> The patch I skipped (9b3bfe5696aa417d38ce903eb345a03d65743dd2)\n> only touched the file drivers/infiniband/core/addr.c,\n> so why can't rebase replay all of the changes?\n\nThat is because David Woodhouse has an evil merge at\nc45aa055c32b488fc3fd73c760df372b09acf69a.\n\nRunning \"git show\" on that commit would tell you the story.\n"},{"id":"33838","messageId":"20070207200508.GE12140@mellanox.co.il","threadId":"6679","inReplyTo":"7vr6t17ohb.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-07T20:05:08Z","receivedAt":"2007-02-07T20:05:08Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: git rebase: unexpected conflict\n> \n> \"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n> \n> > When you have resolved this problem run \"git rebase --continue\".\n> > If you would prefer to skip this patch, instead run \"git rebase --skip\".\n> > To restore the original branch and stop rebasing run \"git rebase --abort\".\n> > --------------------------\n> >\n> > Sure enough, there are conflicts in drivers/mtd/nand/Kconfig:\n> >\n> > <<<<<<< HEAD:drivers/mtd/nand/Kconfig\n> > config MTD_NAND_CAFE\n> >        tristate \"NAND support for OLPC CAFÉ chip\"\n> >        depends on PCI\n> >        help\n> >          Use NAND flash attached to the CAFÉ chip designed for the $100\n> >          laptop.\n> > =======\n> > config MTD_NAND_AT91\n> >         bool \"Support for NAND Flash / SmartMedia on AT91\"\n> >         depends on MTD_NAND && ARCH_AT91\n> >         help\n> >           Enables support for NAND Flash / Smart Media Card interface\n> >           on Atmel AT91 processors.\n> >>>>>>>> [MTD] NAND: AT91 NAND driver:drivers/mtd/nand/Kconfig\n> >\n> > But I don't really understand where do the conflicts come from:\n> > The patch I skipped (9b3bfe5696aa417d38ce903eb345a03d65743dd2)\n> > only touched the file drivers/infiniband/core/addr.c,\n> > so why can't rebase replay all of the changes?\n> \n> That is because David Woodhouse has an evil merge at\n> c45aa055c32b488fc3fd73c760df372b09acf69a.\n> \n> Running \"git show\" on that commit would tell you the story.\n\nSorry about being dense. What's evil there?\nThere seems to have been a merge, and a conflict was resolved.\n\nmst@mst-lt:~/scm/linux-2.6$ git show c45aa055c32b488fc3fd73c760df372b09acf69a\ncommit c45aa055c32b488fc3fd73c760df372b09acf69a\nMerge: 784f4d5... 8dd851d...\nAuthor: David Woodhouse <dwmw2@infradead.org>\nDate:   Sun Oct 22 02:17:05 2006 +0100\n\n    Merge git://git.infradead.org/~dwmw2/cafe-2.6\n\n    Conflicts:\n\n        drivers/mtd/nand/Kconfig\n\ndiff --cc drivers/mtd/nand/Kconfig\nindex b4b1656,5e97e63..564f79d\n--- a/drivers/mtd/nand/Kconfig\n+++ b/drivers/mtd/nand/Kconfig\n@@@ -219,6 -219,6 +219,13 @@@ config MTD_NAND_SHARPS\n        tristate \"Support for NAND Flash on Sharp SL Series (C7xx + others)\"\n        depends on MTD_NAND && ARCH_PXA\n\n++config MTD_NAND_CAFE\n++       tristate \"NAND support for OLPC CAFÉ chip\"\n++       depends on PCI\n++       help\n++       Use NAND flash attached to the CAFÉ chip designed for the $100\n++       laptop.\n++\n  config MTD_NAND_CS553X\n        tristate \"NAND support for CS5535/CS5536 (AMD Geode companion chip)\"\n        depends on MTD_NAND && X86_32 && (X86_PC || X86_GENERICARCH)\n\n-- \nMST\n"},{"id":"33839","messageId":"7vired7mkw.fsf@assigned-by-dhcp.cox.net","threadId":"6679","inReplyTo":"20070207200508.GE12140@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-07T20:13:35Z","receivedAt":"2007-02-07T20:13:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n\n> Sorry about being dense. What's evil there?\n\nSorry for being too terse to be useful.\n\nAn evil merge is a merge that introduces changes that do not\nappear in any parent.\n\n> There seems to have been a merge, and a conflict was resolved.\n>\n> mst@mst-lt:~/scm/linux-2.6$ git show c45aa055c32b488fc3fd73c760df372b09acf69a\n> commit c45aa055c32b488fc3fd73c760df372b09acf69a\n> Merge: 784f4d5... 8dd851d...\n> Author: David Woodhouse <dwmw2@infradead.org>\n> Date:   Sun Oct 22 02:17:05 2006 +0100\n>\n>     Merge git://git.infradead.org/~dwmw2/cafe-2.6\n>\n>     Conflicts:\n>\n>         drivers/mtd/nand/Kconfig\n>\n> diff --cc drivers/mtd/nand/Kconfig\n> index b4b1656,5e97e63..564f79d\n> --- a/drivers/mtd/nand/Kconfig\n> +++ b/drivers/mtd/nand/Kconfig\n> @@@ -219,6 -219,6 +219,13 @@@ config MTD_NAND_SHARPS\n>         tristate \"Support for NAND Flash on Sharp SL Series (C7xx + others)\"\n>         depends on MTD_NAND && ARCH_PXA\n>\n> ++config MTD_NAND_CAFE\n> ++       tristate \"NAND support for OLPC CAFÉ chip\"\n> ++       depends on PCI\n> ++       help\n> ++       Use NAND flash attached to the CAFÉ chip designed for the $100\n> ++       laptop.\n> ++\n>   config MTD_NAND_CS553X\n>         tristate \"NAND support for CS5535/CS5536 (AMD Geode companion chip)\"\n>         depends on MTD_NAND && X86_32 && (X86_PC || X86_GENERICARCH)\n>\n\nNotice two plus letters?  The copy of the file in either\nparents of the merge did not have these 7 lines.  These were\nliterally _added_ by the merge.\n\nSince git-rebase currently ignores merge commits, while you are\nrebasing your branch, your branch does not have these lines\nafter finishing to rebase the commit just before one.  The\ncommit that comes on top of this one _expects_ to have NAND_CAFE\nalready added in the tree, but since you do not have one, you\nget a conflict.\n"},{"id":"33841","messageId":"Pine.LNX.4.64.0702071214170.8424@woody.linux-foundation.org","threadId":"6679","inReplyTo":"7vr6t17ohb.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-07T20:22:35Z","receivedAt":"2007-02-07T20:22:35Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 7 Feb 2007, Junio C Hamano wrote:\n> \n> That is because David Woodhouse has an evil merge at\n> c45aa055c32b488fc3fd73c760df372b09acf69a.\n> \n> Running \"git show\" on that commit would tell you the story.\n\nIt's not really \"evil\". It's just that our \"--cc\" strategy makes it look \nvery odd. But if you then look at why it looks that odd, you can do:\n\n\tgit diff 784f4d5..8dd851d drivers/mtd/nand/Kconfig\n\n(those two sha1's are just the commits that got merged, as reported by \n\"git show\"), and you'll see what happened:\n\n - one branch added the MTD_NAND_CAFE entry\n - the other one had removed the MTD_NAND_AT91 entry\n - they were in the same location in the Kconfig file, so it was a real \n   data conflict\n - when David fixed it up, instead of just trivially selecting the config \n   entry that remained after the merge (MTD_NAND_CAFE), he *also* then \n   moved it to alphabetically the proper place in the file.\n\nEnd result: doing a \"git show\" on the resulting commit does how something \nrather strange (the final result does indeed have lines that did not exist \nin *either* of the parents), but what it doesn't show is the cause of that \nstrange thing, because that ended up being a non-conflict after the merge \n(ie remove the old entries from both files).\n\nIn general, the output of \"--cc\" for conflicting merges is really quite \ngood, but it's can be a bit hard to read, and in cases like this, the \n\"conflict\" is shown in a way that doesn't exactly make the _original_ \nconflict obvious.\n\n\t\t\tLinus\n"},{"id":"33845","messageId":"Pine.LNX.4.64.0702071222470.8424@woody.linux-foundation.org","threadId":"6679","inReplyTo":"20070207200508.GE12140@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-07T20:30:46Z","receivedAt":"2007-02-07T20:30:46Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 7 Feb 2007, Michael S. Tsirkin wrote:\n> \n> Sorry about being dense. What's evil there?\n> There seems to have been a merge, and a conflict was resolved.\n\nThe reason Junio marked it as \"evil\" is that the resolved result was also \nmoved around a bit, making it really hard to see what the original \nconflict was.\n\nIf David had resolved things in place, \"git show\" would actually have \nshown a nicer conflict diff, and _explained_ the conflict better (most \nlikely by not showing it at all - which is just a sign that it was \nresolved cleanly in one direction). As it is, the conflict diff doesn't \ntell anything about what the conflict actually was, or whether it resolved \ntrivially.\n\n[ Note! Conflict diffs do *not* necessarily show the \"conflict\" at all: \n  we'll happily ignore any conflict that was resolved completely in one \n  direction, and the conflict diff output is really more of a warning that \n  something bad could have happened, and somebody tried to *hide* some \n  changes by calling it a merge. ]\n\nSo what makes that an \"evil merge\" is that it triggers the conflict diff, \nand that one really looks like somebody tried to add code and hide it. \nThere was no actual evil activity involved, it was just done in a way that \nraise the red flags of the git --cc format.\n\nSo for a \"non-evil\" merge, the --cc output (which is what \"git show\" shows \nby default) will either be empty to indicate a trivial merge, or will give \na hint about how the problem was resolved. Because of the movement, in \nthis case it did neither.\n\n\t\tLinus\n"},{"id":"33844","messageId":"20070207203133.GG12140@mellanox.co.il","threadId":"6679","inReplyTo":"7vired7mkw.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-07T20:31:33Z","receivedAt":"2007-02-07T20:31:33Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Since git-rebase currently ignores merge commits\n\nUgh. This is the bit I did not know about.\n\nSo the following script is kind of equivalent to rebase -\nit applies commits in range $1..$2 that touch files in list on top of current tree:\n\nfrom=$1\nshift\nto=$1\nshift\ngit-show --pretty=email `git-rev-list --no-merges $from..$to -- $* | tac` > box\n../git-am box\n\nAnd here I was hoping rebase will be smarter and help me out.\n\nOK.\n\nQuestions about the above line now:\n\n1. What is annoying in the above is that\ngit-show can not limit its output to just the part of patch\nthat affects the list of files I give, the way git-diff can.\nWould such an extension be a good idea?\n\n2. It's unfortunate that I need a temp file here.\nCan git-am get stdin somehow?\n\n\n-- \nMST\n"},{"id":"33846","messageId":"7vabzp7lgs.fsf@assigned-by-dhcp.cox.net","threadId":"6679","inReplyTo":"20070207203133.GG12140@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-07T20:37:39Z","receivedAt":"2007-02-07T20:37:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n\n>> Since git-rebase currently ignores merge commits\n>\n> Ugh. This is the bit I did not know about.\n>\n> So the following script is kind of equivalent to rebase -\n> it applies commits in range $1..$2 that touch files in list on top of current tree:\n>\n> from=$1\n> shift\n> to=$1\n> shift\n> git-show --pretty=email `git-rev-list --no-merges $from..$to -- $* | tac` > box\n> ../git-am box\n>\n> And here I was hoping rebase will be smarter and help me out.\n>\n> OK.\n>\n> Questions about the above line now:\n>\n> 1. What is annoying in the above is that\n> git-show can not limit its output to just the part of patch\n> that affects the list of files I give, the way git-diff can.\n> Would such an extension be a good idea?\n\nIt is a good idea and I think it is implemented.\n\n\t$ git-show <commit>... --- <paths>\n\nwould probably give what you want (although I am not absolutely\nsure I understand what you want).\n\n> 2. It's unfortunate that I need a temp file here.\n> Can git-am get stdin somehow?\n\nSee \"git-rebase.sh\" around ll.325.\n"},{"id":"33851","messageId":"20070207211422.GH12140@mellanox.co.il","threadId":"6679","inReplyTo":"7vabzp7lgs.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-07T21:14:22Z","receivedAt":"2007-02-07T21:14:22Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> > git-show can not limit its output to just the part of patch\n> > that affects the list of files I give, the way git-diff can.\n> > Would such an extension be a good idea?\n> \n> It is a good idea and I think it is implemented.\n> \n> \t$ git-show <commit>... --- <paths>\n\nYes, this works. But this seems undocumented. Right?\n\n-- \nMST\n"},{"id":"33854","messageId":"7vired64tp.fsf@assigned-by-dhcp.cox.net","threadId":"6679","inReplyTo":"20070207211422.GH12140@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-07T21:22:26Z","receivedAt":"2007-02-07T21:22:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n\n>> > git-show can not limit its output to just the part of patch\n>> > that affects the list of files I give, the way git-diff can.\n>> > Would such an extension be a good idea?\n>> \n>> It is a good idea and I think it is implemented.\n>> \n>> \t$ git-show <commit>... --- <paths>\n>\n> Yes, this works. But this seems undocumented. Right?\n\nSomehow I think I saw Linus's answer to this exact topic a few\nhours ago.\n\nThis manual page describes only the most frequently used options.\n"},{"id":"33937","messageId":"20070208133921.GB20183@mellanox.co.il","threadId":"6679","inReplyTo":"7vired64tp.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-08T13:39:21Z","receivedAt":"2007-02-08T13:39:21Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: git rebase: unexpected conflict\n> \n> \"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n> \n> >> > git-show can not limit its output to just the part of patch\n> >> > that affects the list of files I give, the way git-diff can.\n> >> > Would such an extension be a good idea?\n> >> \n> >> It is a good idea and I think it is implemented.\n> >> \n> >> \t$ git-show <commit>... --- <paths>\n> >\n> > Yes, this works. But this seems undocumented. Right?\n> \n> Somehow I think I saw Linus's answer to this exact topic a few\n> hours ago.\n> \n> This manual page describes only the most frequently used options.\n\nYes but Linus discussed git-log, which is both complete and correct.\nUnlike git-log, the man page foor git-show is correct but incomplete:\nIt does say \n> This manual page describes only the most frequently used options.\n\nHowever where git-log man page says:\n-----\nThe  command  takes options applicable to the git-rev-list(1) command to\ncontrol what is shown and how, and options applicable to the\ngit-diff-tree(1)  commands to control how the change each commit introduces\nare shown.\n-----\n\nman git-show says nothing of the kind.\n\n\n-------------------------------------------------------------------\n\nJunio, is the following patch correct?\n\nSigned-off-by: Michael S. Tsirkin <mst@mellanox.co.il>\n\n---\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex b802946..361eaec 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -16,7 +16,7 @@ Shows the commit logs.\n \n The command takes options applicable to the gitlink:git-rev-list[1]\n command to control what is shown and how, and options applicable to\n-the gitlink:git-diff-tree[1] commands to control how the change\n+the gitlink:git-diff-tree[1] commands to control how the changes\n each commit introduces are shown.\n \n This manual page describes only the most frequently used options.\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 9051951..f56f164 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -25,6 +25,9 @@ with \\--name-only).\n \n For plain blobs, it shows the plain contents.\n \n+The command takes options applicable to the gitlink:git-diff-tree[1] command to\n+control how the changes the commit introduces are shown.\n+\n This manual page describes only the most frequently used options.\n \n \n-- \nMST\n"},{"id":"33987","messageId":"7vk5ysz3n6.fsf@assigned-by-dhcp.cox.net","threadId":"6679","inReplyTo":"20070208133921.GB20183@mellanox.co.il","subject":"Re: git rebase: unexpected conflict","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-08T22:27:25Z","receivedAt":"2007-02-08T22:27:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n\n> Junio, is the following patch correct?\n\nLooks sane to me.\n"},{"id":"33989","messageId":"20070208222901.GG6560@mellanox.co.il","threadId":"6679","inReplyTo":"7vk5ysz3n6.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-08T22:29:01Z","receivedAt":"2007-02-08T22:29:01Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Junio C Hamano <junkio@cox.net>:\n> Subject: Re: git rebase: unexpected conflict\n> \n> \"Michael S. Tsirkin\" <mst@mellanox.co.il> writes:\n> \n> > Junio, is the following patch correct?\n> \n> Looks sane to me.\n\nYou can take it then :)\n\n-- \nMST\n"},{"id":"34054","messageId":"20070209102323.GV6560@mellanox.co.il","threadId":"6679","inReplyTo":"7vabzp7lgs.fsf@assigned-by-dhcp.cox.net","subject":"Re: git rebase: unexpected conflict","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-02-09T10:23:23Z","receivedAt":"2007-02-09T10:23:23Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> > 2. It's unfortunate that I need a temp file here.\n> > Can git-am get stdin somehow?\n> \n> See \"git-rebase.sh\" around ll.325.\n\ngit-am can read standard input. Document this.\n\nSigned-off-by: Michael S. Tsirkin <mst@mellanox.co.il>\n\n--\n\ndiff --git a/Documentation/git-am.txt b/Documentation/git-am.txt\nindex f7d551e..77ef103 100644\n--- a/Documentation/git-am.txt\n+++ b/Documentation/git-am.txt\n@@ -21,6 +21,10 @@ current branch.\n \n OPTIONS\n -------\n+<mbox>...::\n+\tThe list of mailbox files to read patches from. If you do not\n+\tsupply this argument, reads from the standard input.\n+\n --signoff::\n \tAdd `Signed-off-by:` line to the commit message, using\n \tthe committer identity of yourself.\n\n-- \nMST\n"}]}