{"thread":{"id":"17173","subject":"[Q] git rebase -i -p conflicts with squash","startedAt":"2009-01-14T16:13:45Z","lastAt":"2009-01-15T14:25:17Z","messageCount":3,"participants":["Constantine Plotnikov","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100431","messageId":"85647ef50901140813r6e62ae53u1dbcd48cc472dbcc@mail.gmail.com","threadId":"17173","inReplyTo":null,"subject":"[Q] git rebase -i -p conflicts with squash","fromName":"Constantine Plotnikov","fromEmail":"constantine.plotnikov@gmail.com","sentAt":"2009-01-14T16:13:45Z","receivedAt":"2009-01-14T16:13:45Z","isPatch":false,"sender":{"key":"constantine.plotnikov@gmail.com","avatar":null},"body":"If I run git rebase --interactive with --preserve-merges option and\nselect \"squash\" for one of the commit, the rebase process fails with\nthe message \"Refusing to squash a merge:\n5e775c536654640c173ba71a0af7e84bf8bc618a\". However the neither commit\nparticipating in the squash is a merge commit. Even more, there are no\nmerge commits in the repository at all.\n\n>From my limited understanding of squash operation, it should fail only\nif one of squashed commits is a merge commit, but it should be\npossible to squash non-merge commits without problem as it looks like\nquite safe and local operation (and I might want to preserve merges\nthat happened after squashed commits). Is it the current behaviour a\nbug or a feature?\n\nConstantine\n"},{"id":"100521","messageId":"alpine.DEB.1.00.0901150137070.3586@pacific.mpi-cbg.de","threadId":"17173","inReplyTo":"85647ef50901140813r6e62ae53u1dbcd48cc472dbcc@mail.gmail.com","subject":"Re: [Q] git rebase -i -p conflicts with squash","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-15T00:38:06Z","receivedAt":"2009-01-15T00:38:06Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 14 Jan 2009, Constantine Plotnikov wrote:\n\n> If I run git rebase --interactive with --preserve-merges option and \n> select \"squash\" for one of the commit, the rebase process fails with the \n> message \"Refusing to squash a merge: \n> 5e775c536654640c173ba71a0af7e84bf8bc618a\". However the neither commit \n> participating in the squash is a merge commit. Even more, there are no \n> merge commits in the repository at all.\n> \n> From my limited understanding of squash operation, it should fail only \n> if one of squashed commits is a merge commit, but it should be possible \n> to squash non-merge commits without problem as it looks like quite safe \n> and local operation (and I might want to preserve merges that happened \n> after squashed commits). Is it the current behaviour a bug or a feature?\n\n>From your description, it seems that you are hitting an ordering bug of \nrebase -i -p.\n\nBut without a reproduction recipe (preferably as a patch against our \ntestsuite), I cannot tell.\n\nCiao,\nDscho\n"},{"id":"100598","messageId":"85647ef50901150625r161d5e9eh4df78701a6c74c59@mail.gmail.com","threadId":"17173","inReplyTo":"alpine.DEB.1.00.0901150137070.3586@pacific.mpi-cbg.de","subject":"Re: [Q] git rebase -i -p conflicts with squash","fromName":"Constantine Plotnikov","fromEmail":"constantine.plotnikov@gmail.com","sentAt":"2009-01-15T14:25:17Z","receivedAt":"2009-01-15T14:25:17Z","isPatch":false,"sender":{"key":"constantine.plotnikov@gmail.com","avatar":null},"body":"Here is a reproduction recipe:\n\nGoto to some empty directory and do the following commands on (cygwin,\ngit 1.6.0.4):\n\ngit init\necho data1 > f.txt\ngit add f.txt\ngit commit -m second\necho data2 >> f.txt\ngit add f.txt\ngit commit -m second\necho data3 >> f.txt\ngit add f.txt\ngit commit -m third\necho '#!/usr/bin/sh' >myed.sh\necho \"echo -e '2\\ns/pick/s/\\np\\nw\\nq' | ed \\$1\"  >>myed.sh\nchmod a+x myed.sh\nexport GIT_EDITOR=`pwd`/myed.sh\ngit rebase -p -i master~2\n\nThe git rebase will exit with error writing something like the\nfollowing on stderr:\nRefusing to squash a merge: 3b9e0d80da20e3543225679906be1cc5cf1a9f44\n\nConstantine\n\nOn Thu, Jan 15, 2009 at 3:38 AM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Wed, 14 Jan 2009, Constantine Plotnikov wrote:\n>\n>> If I run git rebase --interactive with --preserve-merges option and\n>> select \"squash\" for one of the commit, the rebase process fails with the\n>> message \"Refusing to squash a merge:\n>> 5e775c536654640c173ba71a0af7e84bf8bc618a\". However the neither commit\n>> participating in the squash is a merge commit. Even more, there are no\n>> merge commits in the repository at all.\n>>\n>> From my limited understanding of squash operation, it should fail only\n>> if one of squashed commits is a merge commit, but it should be possible\n>> to squash non-merge commits without problem as it looks like quite safe\n>> and local operation (and I might want to preserve merges that happened\n>> after squashed commits). Is it the current behaviour a bug or a feature?\n>\n> From your description, it seems that you are hitting an ordering bug of\n> rebase -i -p.\n>\n> But without a reproduction recipe (preferably as a patch against our\n> testsuite), I cannot tell.\n>\n> Ciao,\n> Dscho\n>\n>\n"}]}