login
Header Space

 
 

Re: rebasing merges

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andreas Ericsson <ae@...>
Cc: Johannes Sixt <j.sixt@...>, <git@...>
Date: Tuesday, September 23, 2008 - 2:29 pm

> > That's beside the point though, as I firmly believe git should be more

I've attached a test. You were both correct, `git rebase -i -p` keeps
the merge intact and doesn't duplicate the commits. This is awesome.

So, I'm wondering what the best way to integrate this into our workflow
is. Ideally, I think it would be great to just do:

    git pull --rebase --preserve-merges

Or even better just `git pull` with branch.x.rebase=true and
branch.x.preserve-merges=true property (throw in a
branch.autosetuppreservemerges and I'll be set, haha).

While `git fetch + git rebase -i -p` will work every time, it won't be
fun to have the editor pop open, just exit it because we're not really
doing an interactive rebase, we're just borrowing its more powerful
rebase implementation, and repeat this each time a dev wants to do a
pull. Or, tell them to do a "git pull --rebase" most of the time, until
it screws up, then back up and do the other. Both doable, but not ideal.

I understand Johannes's scenario of rebasing the entire branch, and it
looks like rebase--interactive already supports this as well--e.g. if
you pass `-p`, you get our desired behavior, and if you don't pass `-p`,
you get Johannes's desired behavior of merge squashing.

Given rebase--interactive seems to be a superset of the current rebase
implementation, could the current rebase implementation just go away and
instead become a non-interactive caller (e.g. just avoid popping up the
editor with the pick list) of rebase--interactive's more powerful
rebase logic?

(Disclaimer: I'm throwing the term "more powerful" around without really
knowing whether that is true or not--for our scenario, it seems that
way, but there could be other cases I don't know about where the current
rebase implementation is superior to rebase--interactive's.)

Thanks,
Stephen
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
rebasing merges, Stephen Haberman, (Mon Sep 22, 4:57 pm)
Re: rebasing merges, Stephen Haberman, (Tue Sep 23, 12:19 am)
Re: rebasing merges, Johannes Sixt, (Tue Sep 23, 2:09 am)
Re: rebasing merges, Stephen Haberman, (Tue Sep 23, 3:46 am)
Re: rebasing merges, Andreas Ericsson, (Tue Sep 23, 4:20 am)
Re: rebasing merges, Stephen Haberman, (Tue Sep 23, 5:03 am)
Re: rebasing merges, Andreas Ericsson, (Tue Sep 23, 5:11 am)
Re: rebasing merges, SZEDER , (Tue Sep 23, 7:16 am)
Re: rebasing merges, Stephen Haberman, (Tue Sep 23, 5:30 am)
Re: rebasing merges, Stephen Haberman, (Tue Sep 23, 2:29 pm)
Re: rebasing merges, Johannes Sixt, (Tue Sep 23, 4:00 am)
Re: rebasing merges, Samuel Tardieu, (Tue Sep 23, 3:30 am)
Re: rebasing merges, Andreas Ericsson, (Tue Sep 23, 4:06 am)
Re: rebasing merges, Johannes Sixt, (Tue Sep 23, 3:52 am)
speck-geostationary