* git rebase interactive does not respect merge options
@ 2012-04-25 16:53 Mathieu Boespflug
0 siblings, 0 replies; only message in thread
From: Mathieu Boespflug @ 2012-04-25 16:53 UTC (permalink / raw)
To: git
Hi,
I have the following issue with git rebase -i: it does not seem to
respect any merge options that I pass it.
Say I'm in the following scenario. I made a bunch of commits in master,
and I would like to interactively rebase these commits on top of
origin/master. Say I want to drop a few commits that introduced only
whitespace changes. Dropping these commits might cause conflicts during
rebasing of later commits, because these later commits might affect the
same lines than the ones that were affected by the whitespace change.
Now, to avoid having to resolve these conflicts by hand, I would expect
to be able to
$ git rebase -X ignore-space-change -i origin/master
According to git-rebase(1), passing -X implies --merge and
--strategy=recursive. But these flags seem to be ignored, even if
passed explicitly. Likewise, if I specify
$ git rebase -X ours -i origin/master
or
$ git rebase -X theirs -i origin/master
I still get conflicts, which I have to resolve by hand. Passing -p makes
no difference either.
A cursory look through the source of /usr/lib/git-core/git-rebase
suggests to me git-rebase forks to either git-rebase--merge or
git-rebase--interactive to do much of the work, the two being mutually
exclusive. If this is the case, shouldn't the documentation at least
reflect that one has to pass either --interactive or --merge on the
command line, but the two together won't work?
I submit, however, that being able to specify a merge strategy during
interactive rebasing is terribly useful. Not being able to do means that
to drop commits without having to resolve conflicts by hand I have to do
split my rebasing into chunks of non-interactive
$ git rebase -s <strategy> -X <strategy-option> --onto <newbase> <upstream>
... which is significantly more cumbersome.
Thanks,
-- Mathieu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-25 16:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 16:53 git rebase interactive does not respect merge options Mathieu Boespflug
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).