Re: [PATCH 4/4] git-rebase -i: New option to support rebase with merges
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 24, 2008, 13:08 UTC
- Message-ID
- <alpine.LSU.1.00.0803241406530.4353@racer.site>
- In-Reply-To
- <20080324111413.GA18488@alea.gnuu.de>
Hi,
On Mon, 24 Mar 2008, Jörg Sommer wrote:
Show 27 quoted lines
> Johannes Schindelin schrieb am Sun 23. Mar, 23:41 (+0100):
> > On Sun, 23 Mar 2008, Jörg Sommer wrote:
> >
> > > @@ -150,7 +152,18 @@ pick_one () {
> > > sha1=$(git rev-parse --short $sha1)
> > > output warn Fast forward to $sha1
> > > else
> > > - output git cherry-pick "$@"
> > > + if test t = "$LINEAR_HISTORY" &&
> > > + other_parents="$(parents_of_commit $sha1 | cut -s -d' ' -f2-)" &&
> > > + test -n "$other_parents"
> > > + then
> > > + if test a"$1" = a-n
> > > + then
> > > + merge_opt=--no-commit
> > > + fi
> > > + redo_merge $sha1 $no_commit $other_parents
> > > + else
> > > + output git cherry-pick "$@"
> > > + fi
> >
> > Now, that is funny. In case of --preserve-merges, I would have
> > expected you to touch pick_one_preserving_merges(), not pick_one().
> >
> > I would find it highly illogical to try to redo merges _without_ -p.
>
> Me too, but I think it's not possible to do what I want with -p.But that is not a reason to mess up the source code. If you do a thing as --linear-history (or --first-parents, as I would prefer it), that should be in the code path of --preserve-merges (and actually _imply_ that option).
--linear-history makes no sense at all without --preserve-merges.
Ciao, Dscho