{"thread":{"id":"30333","subject":"git rebase interactive does not respect merge options","startedAt":"2012-04-25T16:53:10Z","lastAt":"2012-04-25T16:53:10Z","messageCount":1,"participants":["Mathieu Boespflug"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"190066","messageId":"20120425165310.GA4806@santiago","threadId":"30333","inReplyTo":null,"subject":"git rebase interactive does not respect merge options","fromName":"Mathieu Boespflug","fromEmail":"mboes@tweag.net","sentAt":"2012-04-25T16:53:10Z","receivedAt":"2012-04-25T16:53:10Z","isPatch":false,"sender":{"key":"mboes@tweag.net","avatar":null},"body":"Hi,\n\nI have the following issue with git rebase -i: it does not seem to\nrespect any merge options that I pass it.\n\nSay I'm in the following scenario. I made a bunch of commits in master,\nand I would like to interactively rebase these commits on top of\norigin/master. Say I want to drop a few commits that introduced only\nwhitespace changes. Dropping these commits might cause conflicts during\nrebasing of later commits, because these later commits might affect the\nsame lines than the ones that were affected by the whitespace change.\nNow, to avoid having to resolve these conflicts by hand, I would expect\nto be able to\n\n$ git rebase -X ignore-space-change -i origin/master\n\nAccording to git-rebase(1), passing -X implies --merge and\n--strategy=recursive. But these flags seem to be ignored, even if\npassed explicitly. Likewise, if I specify\n\n$ git rebase -X ours -i origin/master\n\nor\n\n$ git rebase -X theirs -i origin/master\n\nI still get conflicts, which I have to resolve by hand. Passing -p makes\nno difference either.\n\nA cursory look through the source of /usr/lib/git-core/git-rebase\nsuggests to me git-rebase forks to either git-rebase--merge or\ngit-rebase--interactive to do much of the work, the two being mutually\nexclusive. If this is the case, shouldn't the documentation at least\nreflect that one has to pass either --interactive or --merge on the\ncommand line, but the two together won't work?\n\nI submit, however, that being able to specify a merge strategy during\ninteractive rebasing is terribly useful. Not being able to do means that\nto drop commits without having to resolve conflicts by hand I have to do\nsplit my rebasing into chunks of non-interactive\n\n$ git rebase -s <strategy> -X <strategy-option> --onto <newbase> <upstream>\n\n... which is significantly more cumbersome.\n\nThanks,\n\n-- Mathieu\n"}]}