{"thread":{"id":"12100","subject":"another git rebase -i problem","startedAt":"2008-02-14T09:37:30Z","lastAt":"2008-02-15T09:21:35Z","messageCount":6,"participants":["Uwe Kleine-König","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"68725","messageId":"20080214093730.GA20408@digi.com","threadId":"12100","inReplyTo":null,"subject":"another git rebase -i problem","fromName":"Uwe Kleine-König","fromEmail":"uwe.kleine-koenig@digi.com","sentAt":"2008-02-14T09:37:30Z","receivedAt":"2008-02-14T09:37:30Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nthis time it's more trivial, so maybe PEBKAC.\n\nAfter applying the patch below, the test fails.  git rebase (without -i)\nworks.\n\nThe relevant history looks as follows:\n\n\tF - I+H+G+G - ... <- branch3\n\t \\\n\t  I\n\nAnd moreover I have a more complicated history here with git rebase\nfailing but I think this here is not my problem :-(\n\nBest regards\nUwe\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex e5ed745..4d2dec7 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -362,4 +362,11 @@ test_expect_success 'rebase with a file named HEAD in worktree' '\n \n '\n \n+test_expect_success 'rebase patch already merged' '\n+\n+\tgit checkout -b branch4 I &&\n+\tgit rebase -i branch3\n+\n+'\n+\n test_done\n-- \n1.5.4.1\n\n\n-- \nUwe Kleine-König, Software Engineer\nDigi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany\nTax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962\n"},{"id":"68731","messageId":"alpine.LSU.1.00.0802141232070.30505@racer.site","threadId":"12100","inReplyTo":"20080214093730.GA20408@digi.com","subject":"Re: another git rebase -i problem","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-14T12:35:56Z","receivedAt":"2008-02-14T12:35:56Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 14 Feb 2008, Uwe Kleine-König wrote:\n\n> After applying the patch below, the test fails. [describes a case where \n> all patches were applied upstream already]\n\nThis is by design.  If no patches are to be applied, there is nothing you \ncan do interactively.  And git rebase -i should tell you as much:\n\n\tNothing to do\n\nMaybe it should say\n\n\tThere is nothing you can rebase interactively\n\nBut I don't like that.\n\nAlternatively, git rebase -i could reset --hard to upstream, but I don't \nlike that either: if I rebase -i, it is because I want to reorder/arrange \npatches.  If there is no patch to be rearranged, I did something wrong.\n\nCiao,\nDscho\n\n"},{"id":"68733","messageId":"20080214130228.GB28472@digi.com","threadId":"12100","inReplyTo":"alpine.LSU.1.00.0802141232070.30505@racer.site","subject":"Re: another git rebase -i problem","fromName":"Uwe Kleine-König","fromEmail":"uwe.kleine-koenig@digi.com","sentAt":"2008-02-14T13:02:28Z","receivedAt":"2008-02-14T13:02:28Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Thu, 14 Feb 2008, Uwe Kleine-König wrote:\n> \n> > After applying the patch below, the test fails. [describes a case where \n> > all patches were applied upstream already]\n> \n> This is by design.  If no patches are to be applied, there is nothing you \n> can do interactively.  And git rebase -i should tell you as much:\n> \n> \tNothing to do\n> \n> Maybe it should say\n> \n> \tThere is nothing you can rebase interactively\n> \n> But I don't like that.\n>\n> Alternatively, git rebase -i could reset --hard to upstream, but I don't \n> like that either: if I rebase -i, it is because I want to reorder/arrange \n> patches.  If there is no patch to be rearranged, I did something wrong.\nAh, OK this disqualifies my test case, but the problem is real:\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex e5ed745..f0499e6 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -362,4 +362,11 @@ test_expect_success 'rebase with a file named HEAD in worktree' '\n \n '\n \n+test_expect_success 'rebase patch already merged' '\n+\n+\tgit checkout -b branch4 twerp &&\n+\tFAKE_LINES=\"1 2 4 3\" git rebase -i branch3\n+\n+'\n+\n test_done\n\nBest regards\nUwe\n\n-- \nUwe Kleine-König, Software Engineer\nDigi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany\nTax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962\n"},{"id":"68739","messageId":"alpine.LSU.1.00.0802141537000.30505@racer.site","threadId":"12100","inReplyTo":"20080214130228.GB28472@digi.com","subject":"Re: another git rebase -i problem","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-14T15:39:35Z","receivedAt":"2008-02-14T15:39:35Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 14 Feb 2008, Uwe Kleine-König wrote:\n\n> Ah, OK this disqualifies my test case, but the problem is real:\n> \n> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\n> index e5ed745..f0499e6 100755\n> --- a/t/t3404-rebase-interactive.sh\n> +++ b/t/t3404-rebase-interactive.sh\n> @@ -362,4 +362,11 @@ test_expect_success 'rebase with a file named HEAD in worktree' '\n>  \n>  '\n>  \n> +test_expect_success 'rebase patch already merged' '\n> +\n> +\tgit checkout -b branch4 twerp &&\n> +\tFAKE_LINES=\"1 2 4 3\" git rebase -i branch3\n> +\n> +'\n> +\n>  test_done\n\nSince the patches were already applied, but git (as well as you!) failed \nto remove them from the patch list, the user has to be asked to skip the \npatch.\n\nUnfortunately, I have no time to look into this, and I do not even think \nthat cherry-pick tells me if a patch was already applied (as opposed to a \nfailed patch application), so I doubt that the message can be made more \nmeaningful.\n\nAnyway, your \"problem\" is that you have to say \"git rebase --skip\", \nbecause the patch has been applied to upstream already (but looked \ndifferently enough that the patch id was different).\n\nCiao,\nDscho\n"},{"id":"68799","messageId":"20080215081046.GA12091@digi.com","threadId":"12100","inReplyTo":"alpine.LSU.1.00.0802141537000.30505@racer.site","subject":"Re: another git rebase -i problem","fromName":"Uwe Kleine-König","fromEmail":"uwe.kleine-koenig@digi.com","sentAt":"2008-02-15T08:10:46Z","receivedAt":"2008-02-15T08:10:46Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hallo Johannes,\n\n> Anyway, your \"problem\" is that you have to say \"git rebase --skip\", \n> because the patch has been applied to upstream already (but looked \n> differently enough that the patch id was different).\nI just noticed that non-interactive rebase fails in that case, too.\n\nIn my eyes \n\n\tVISUAL=: git rebase -i ...\n\nshould behave exactly as\n\n\tgit rebase ...\n\nbut as this is a corner case that I will probably never run into it's OK\nfor me that it doesn't.\n\nBest regards\nUwe\n\n-- \nUwe Kleine-König, Software Engineer\nDigi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany\nTax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962\n"},{"id":"68802","messageId":"20080215092135.GB12091@digi.com","threadId":"12100","inReplyTo":"20080214093730.GA20408@digi.com","subject":"Re: another git rebase -i problem","fromName":"Uwe Kleine-König","fromEmail":"uwe.kleine-koenig@digi.com","sentAt":"2008-02-15T09:21:35Z","receivedAt":"2008-02-15T09:21:35Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello (Dscho),\n\n> And moreover I have a more complicated history here with git rebase\n> failing but I think this here is not my problem :-(\nI currently have no time to have a deeper look into that either, but\nhere comes the more complicated case, just for the record:\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git rev-parse HEAD\n\t57db5b05c27d8c6d66264251ee1124c762aee659\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git rev-parse linus/master\n\t4ee29f6a52158cea526b16a44ae38643946103ec\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git status\n\t# On branch master\n\tnothing to commit (working directory clean)\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git rebase -i -p linus/master\n\t...\n\t(squash 57db5b0 onto d528ae7)\n\t...\n\t(write commit log for d528ae7+57db5b0)\n\t...\n\tSuccessfully rebased and updated refs/heads/master.\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git status\n\t# On branch master\n\t# Changes to be committed:\n\t#   (use \"git reset HEAD <file>...\" to unstage)\n\t#\n\t#       modified:   Documentation/00-INDEX\n\t#       new file:   Documentation/cpuidle/core.txt\n\t#       new file:   Documentation/cpuidle/driver.txt\n\t#       new file:   Documentation/cpuidle/governor.txt\n\t#       new file:   Documentation/cpuidle/sysfs.txt\n\t#       modified:   MAINTAINERS\n\t#       modified:   arch/alpha/kernel/osf_sys.c\n\t#       modified:   arch/arm/mach-ns9xxx/Kconfig\n\t#       modified:   arch/arm/mach-ns9xxx/Makefile\n\t#       deleted:    arch/arm/mach-ns9xxx/plat-leds-gpio.c\n\t#       modified:   arch/blackfin/kernel/traps.c\n\t#       modified:   arch/cris/arch-v10/lib/memset.c\n\t#       modified:   arch/cris/arch-v32/lib/memset.c\n\t#       modified:   arch/m68knommu/platform/5206/Makefile\n\t#       modified:   arch/m68knommu/platform/5206e/Makefile\n\t#       modified:   arch/m68knommu/platform/520x/Makefile\n\t#       modified:   arch/m68knommu/platform/523x/Makefile\n\t#       modified:   arch/m68knommu/platform/5249/Makefile\n\t#       modified:   arch/m68knommu/platform/5272/Makefile\n\t#       modified:   arch/m68knommu/platform/527x/Makefile\n\t#       modified:   arch/m68knommu/platform/528x/Makefile\n\t#       modified:   arch/m68knommu/platform/5307/Makefile\n\t#       modified:   arch/m68knommu/platform/532x/Makefile\n\t#       modified:   arch/m68knommu/platform/5407/Makefile\n\t#       modified:   arch/m68knommu/platform/coldfire/Makefile\n\t#       modified:   arch/m68knommu/platform/coldfire/entry.S\n\t#       modified:   arch/m68knommu/platform/coldfire/timers.c\n\t...\n\n\tukleinek@zentaur:~/gsrc/linux-2.6$ git show\n\tcommit 57db5b05c27d8c6d66264251ee1124c762aee659\n\t...\n\nI tracked the problem down to NEWHEAD being wrong.  The update-ref\nbefore warn \"Successfully rebased and updated $HEADNAME.\" has\nNEWHEAD=OLDHEAD because\n.git/.dotest-merge/rewritten/57db5b05c27d8c6d66264251ee1124c762aee659\ncontains 57db5b05c27d8c6d66264251ee1124c762aee659 itself.\n\nIf you want to experiment with that, you can get\n57db5b05c27d8c6d66264251ee1124c762aee659 from the bundle at\n\n\thttp://www.modarm9.com/~ukleinek/57db5b05c2\n\nBest regards\nUwe\n\n-- \nUwe Kleine-König, Software Engineer\nDigi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany\nTax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962\n"}]}