Re: [RFC/PATCH] Add git-squash tool and tests
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 9, 2008, 21:34 UTC
- Message-ID
- <alpine.DEB.1.00.0806092232480.1783@racer>
- In-Reply-To
- <484D984F.20700@gnu.org>
Hi,
On Mon, 9 Jun 2008, Paolo Bonzini wrote:
Show 7 quoted lines
> > Junio, this could be a backend for the zucchini instruction, by just
> > zucchini <n> => git-squash "HEAD~$(expr $n + 1)" ;-)
>
> ... zucchini becomes
>
> git reset --hard HEAD~$(expr $n)
> git merge --no-ff --squash HEAD@{1}Except that zucchini is meant for the sequencer, which can implement it much more efficiently (i.e. it does not have to check out HEAD~$n). Also, it must not rely on reflogs being enabled.
sequencer is plumbing, while the reset mantra is porcelain.
Ciao, Dscho