pull --preserve-merges
Hi,
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for git pull:
http://thread.gmane.org/gmane.comp.version-control.git/96513
Andreas had a patch to help by supporting manually typing out git pull --rebase --preserve-merges:
http://thread.gmane.org/gmane.comp.version-control.git/96593
And then I did another small copy/paste patch on top to add a config setting of branch.<name>.preservemerges much like the existing branch.<name>.rebase.
The patches haven't gotten an explicit "no" that I noticed, nor have they been applied...is there anything I can do to move them along? Resubmit them or what not?
Thanks,
Stephen
Quoted 6 lines
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for
git pull:http://thread.gmane.org/gmane.comp.version-control.git/96513
Quoted 8 lines
Andreas had a patch to help by supporting manually typing out
git pull --rebase --preserve-merges:http://thread.gmane.org/gmane.comp.version-control.git/96593
And then I did another small copy/paste patch on top to add a config setting of
branch.<name>.preservemergesmuch like the existingbranch.<name>.rebase.
I just noticed the branch.<name>.mergeoptions flag in the merge docs. Instead of having both branch.<name>.rebase and .preservemerges, and possibly even more config parameters for whatever other people what to configure as well, would something like branch.<name>.pulloptions be a better idea?
In our case, we could then set all the branch.<name>.pulloptions to "--rebase --preserve-merges" (likely via a post-checkout hook) and be happy with git pull "just working".
Adding pulloptions would make the patch a little bit trickier, for me to implement anyway, and I assume the rebase flag would have to stay for backwards compatibility, but if a pulloptions config parameter approach would be more acceptable than an explicit preservemerges config (and hence more likely to get the patches accepted), I'd be willing to work on that.
Thanks,
Stephen
Hi,
Quoted 16 lines · Stephen Haberman
[citing someone, presumably himself]
Quoted 5 lines
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for
git pull:http://thread.gmane.org/gmane.comp.version-control.git/96513
Quoted 8 lines
Andreas had a patch to help by supporting manually typing out
git pull --rebase --preserve-merges:http://thread.gmane.org/gmane.comp.version-control.git/96593
And then I did another small copy/paste patch on top to add a config setting of
branch.<name>.preservemergesmuch like the existingbranch.<name>.rebase.
Quoted 5 lines
I just noticed the
branch.<name>.mergeoptionsflag in the merge docs. Instead of having bothbranch.<name>.rebaseand.preservemerges, and possibly even more config parameters for whatever other people what to configure as well, would something likebranch.<name>.pulloptionsbe a better idea?
Or we can stay backwards-compatible and support
[branch "<name">] rebase = preserve-merges
Ciao,
Dscho
Hi,
Quoted 2 lines · Stephen Haberman
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for
git pull
That might be something you want, but you cannot call it
git pull --preserve-merges
since everybody used to "pull = fetch && merge" would go "Huh? A merge _does_ preserve merges".
If at all, you could call it "--rebase=preserve-merges".
Ciao,
Dscho
Le Saturday 08 November 2008 16:08:41 Johannes Schindelin, vous avez écrit :
Quoted 6 lines
Hi,
Quoted 2 lines · Stephen Haberman
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for
git pull
Quoted 9 lines
That might be something you want, but you cannot call it
git pull --preserve-mergessince everybody used to "pull = fetch && merge" would go "Huh? A merge _does_ preserve merges".
If at all, you could call it "--rebase=preserve-merges".
Why not --rebase --keep-merges? Personnally, I think it makes things clearer since in general options are either standalone or have a value.
Signature · 1 line
fge
Replying to both Johannes and Francis...
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Awhile ago I brought up wanting to have a "rebase with preserve merges" option for
git pullThat might be something you want, but you cannot call it
git pull --preserve-mergessince everybody used to "pull = fetch && merge" would go "Huh? A merge _does_ preserve merges".
Ah, right, sorry, Johannes, I know it only makes sense in the context if --rebase is also being in use, I was just being too brief.
Quoted 1 line
Quoted 1 line
If at all, you could call it "--rebase=preserve-merges".
I'd be fine with that, I had not thought of it.
Quoted 2 lines
Why not --rebase --keep-merges? Personnally, I think it makes things clearer since in general options are either standalone or have a value.
I originally had --rebase --preserve-merges in mind because it matches the existing -p/--preserve-merges flag that git rebase has that I'd like git pull to just pass along.
If they were separate flags, passing just --preserve-merges without --rebase should likely report an error. Probably the same thing if someone sets branch.name.preservemerges but branch.name.rebase is not set.
Unless instead of separate config parameters, branch.name.rebase uses Johannes's suggestion and has separate values...true or false or preserve-merges. That would probably better parallelize with the --rebase=preserve-merges style command line argument.
Between one flag/config parameter or two flags/config parameters, I could go either way and would be willing to patch together either one to get it in.
Thanks,
Stephen