{"thread":{"id":"11838","subject":"Strange behavior with git rebase (-i)","startedAt":"2008-02-02T10:44:04Z","lastAt":"2008-02-03T01:21:12Z","messageCount":5,"participants":["Stefan (metze) Metzmacher","Johannes Schindelin","Steven Walter"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"67118","messageId":"47A44974.7050907@samba.org","threadId":"11838","inReplyTo":null,"subject":"Strange behavior with git rebase (-i)","fromName":"Stefan (metze) Metzmacher","fromEmail":"metze@samba.org","sentAt":"2008-02-02T10:44:04Z","receivedAt":"2008-02-02T10:44:04Z","isPatch":false,"sender":{"key":"metze@samba.org","avatar":null},"body":"Hi,\n\nI just hit a really strange thing:\n\nI was on a branch called 'v4-0-test',\nthen I did a git rebase -i orgin/v4-0-test\nand removed some patches and prefixed all others\nwith 'edit'.\nThen:\n\ngit commit --amend\ngit rebase --continue\ngit commit --amend\ngit rebase --continue\ngit commit --amend\ngit commit --amend (again)\ngit branch\n * v4-0-test\ngit log\n (this showed what I wanted)\ngit show -p --stat\n (to really make sure that the top revision is the one I want)\ngit push origin v4-0-test\n And this pushed the top revision BEFORE the rebase!!!\n Because I forgot a 'git rebase --continue' to finalize the rebase.\n\nIn the end it's my fault, because I forgot the last rebase --continue,\nbut I think it's bad that git behaves that way.\n\nWould it be possible to disable some operations while others\nare unfinished, git am (-i) might have similar effects.\n\nI was using git 1.5.3.2\n\nCould it be that 6fd2f5e60d4d574ff9e5dd8ce1e229328c785d69 was\ncreated to fix a similar problem?\n\nmetze\n\nhttp://gitweb.samba.org/?p=samba.git;a=commit;h=ec0ee2aa5f4bef32f09a426d91c28c985f843038\nand the 10 commits before...:-(\n\n\n"},{"id":"67138","messageId":"alpine.LSU.1.00.0802021538300.7372@racer.site","threadId":"11838","inReplyTo":"47A44974.7050907@samba.org","subject":"Re: Strange behavior with git rebase (-i)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-02T15:42:06Z","receivedAt":"2008-02-02T15:42:06Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 2 Feb 2008, Stefan (metze) Metzmacher wrote:\n\n> [started git rebase -i]\n> git commit --amend (again)\n> git branch\n>  * v4-0-test\n> git log\n>  (this showed what I wanted)\n> git show -p --stat\n>  (to really make sure that the top revision is the one I want)\n> git push origin v4-0-test\n>  And this pushed the top revision BEFORE the rebase!!!\n>  Because I forgot a 'git rebase --continue' to finalize the rebase.\n\nI don't believe it.  \"git branch\" would have shown \"* (no branch)\" as \ncurrent branch, unless the rebase is finalized.\n\ngit rebase -i works on a _detached_ HEAD, for two reasons:\n\n- easier working with reflogs (as the branch's reflog shows before rebase \nand after rebase, but nothing in between), and\n\n- to prevent exactly the scenario you are describing.\n\nCiao,\nDscho\n"},{"id":"67143","messageId":"20080202162524.GB25945@dervierte","threadId":"11838","inReplyTo":"alpine.LSU.1.00.0802021538300.7372@racer.site","subject":"Re: Strange behavior with git rebase (-i)","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2008-02-02T16:25:24Z","receivedAt":"2008-02-02T16:25:24Z","isPatch":false,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"On Sat, Feb 02, 2008 at 03:42:06PM +0000, Johannes Schindelin wrote:\n> I don't believe it.  \"git branch\" would have shown \"* (no branch)\" as \n> current branch, unless the rebase is finalized.\n> \n> git rebase -i works on a _detached_ HEAD, for two reasons:\n\n> On Sat, 2 Feb 2008, Stefan (metze) Metzmacher wrote:\n> > I was using git 1.5.3.2\n\nDid rebase -i in git 1.5.3.2 use a detached head?  I thought that was\nnew in 1.5.4.\n-- \n-Steven Walter <stevenrwalter@gmail.com>\nFreedom is the freedom to say that 2 + 2 = 4\nB2F1 0ECC E605 7321 E818  7A65 FC81 9777 DC28 9E8F \n"},{"id":"67145","messageId":"alpine.LSU.1.00.0802021708030.7372@racer.site","threadId":"11838","inReplyTo":"20080202162524.GB25945@dervierte","subject":"Re: Strange behavior with git rebase (-i)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-02T17:08:34Z","receivedAt":"2008-02-02T17:08:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 2 Feb 2008, Steven Walter wrote:\n\n> On Sat, Feb 02, 2008 at 03:42:06PM +0000, Johannes Schindelin wrote:\n> > I don't believe it.  \"git branch\" would have shown \"* (no branch)\" as \n> > current branch, unless the rebase is finalized.\n> > \n> > git rebase -i works on a _detached_ HEAD, for two reasons:\n> \n> > On Sat, 2 Feb 2008, Stefan (metze) Metzmacher wrote:\n> > > I was using git 1.5.3.2\n> \n> Did rebase -i in git 1.5.3.2 use a detached head?  I thought that was\n> new in 1.5.4.\n\nrebase -i uses a detached HEAD since it was merged.  In 1.5.4, rebase \n(note the absence of -i) uses a detached HEAD, too.\n\nCiao,\nDscho\n"},{"id":"67170","messageId":"47A51708.4020406@samba.org","threadId":"11838","inReplyTo":"alpine.LSU.1.00.0802021708030.7372@racer.site","subject":"Re: Strange behavior with git rebase (-i)","fromName":"Stefan (metze) Metzmacher","fromEmail":"metze@samba.org","sentAt":"2008-02-03T01:21:12Z","receivedAt":"2008-02-03T01:21:12Z","isPatch":false,"sender":{"key":"metze@samba.org","avatar":null},"body":"Johannes Schindelin schrieb:\n> Hi,\n> \n> On Sat, 2 Feb 2008, Steven Walter wrote:\n> \n>> On Sat, Feb 02, 2008 at 03:42:06PM +0000, Johannes Schindelin wrote:\n>>> I don't believe it.  \"git branch\" would have shown \"* (no branch)\" as \n>>> current branch, unless the rebase is finalized.\n>>>\n>>> git rebase -i works on a _detached_ HEAD, for two reasons:\n>>> On Sat, 2 Feb 2008, Stefan (metze) Metzmacher wrote:\n>>>> I was using git 1.5.3.2\n>> Did rebase -i in git 1.5.3.2 use a detached head?  I thought that was\n>> new in 1.5.4.\n> \n> rebase -i uses a detached HEAD since it was merged.  In 1.5.4, rebase \n> (note the absence of -i) uses a detached HEAD, too.\n\nHmm, I can't reproduce this...maybe I was just to stupid and didn't look\nat the git branch output carefully...\n\nmetze\n\n"}]}