Defaulting --rebase-merges overall?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

I've had a couple of users recently be bitten by "git rebase"'s
default handling of merge commits:

* One user had selected the "git config pull.rebase true" option from
the "Need to specify how to reconcile divergent branches" pull
conflict hint text, without understanding enough about what that
meant: that if they do a "pull" right after having done a (non-ff)
"merge", their commit history would get mangled with a set of
duplicated commits.

* The other was using a GUI (Intellij IDEA), which offered to rebase
when there was a push conflict, but didn't mention or do anything
special about the fact that the single commit to be rebased on a push
conflict was a merge commit (same consequences)

In terms of "quick wins" to help these users avoid the trap they fell
into, I can think of two "quick wins":
1. Change the "Need to specify how to reconcile divergent branches"
pull conflict hint text to offer "git config pull.rebase merges"
instead of "git config pull.rebase true"
2. Offer a global "--rebase-merges by default" config option (I know
there is already a per-branch option, but that's really not very
effective when people are creating new branches all the time)

I've scanned the archives of the last year or two and can't find any
chatter or activity around this - does anyone have an opinion
regarding either of these approaches?

Ideally I'd like to do both. The hint change for people who follow the
hint without understanding the dangers, and the global config option
for people who understand this historical weirdness of rebase and
would rather see the back of it, now that "--rebase-merges" exists and
improves rebase behavior for most users under most circumstances.
Presumably with such a global config option we would also need a
"--no-rebase-merges" option to counter its effect on-demand?

As I think about it, the global option sounds like it might be hard to
prove the correctness of (and compatibility with the hosts of other
options), so I probably won't be qualified to do this. Is there any
objection to the simple hint change, at least?

Thanks,
Tao



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux