Re: [RFC/PATCH] Add git-squash tool and tests
- From
Stephan Beyer <s-beyer@gmx.net>
- Date
- Jun 9, 2008, 23:46 UTC
- Message-ID
- <20080609234610.GF8079@leksak.fem-net>
- In-Reply-To
- <alpine.DEB.1.00.0806092133260.1783@racer>
Hi,
> Isn't it possible to do this with something like
>
> $ git reset --hard X^ &&
> git merge --no-ff --squash HEAD@{1}$ git merge --no-ff --squash HEAD@{1} You cannot combine --squash with --no-ff.
But without --no-ff it somehow squashes to the index, I just have to commit ;-)
Btw,
if you husk and boil git-squash.sh a while, you get down to
git reset --soft X^
git commit {options}
which is way simpler.The rest is just usage-blabla, option passing and checking for merges that should result in an error if no --include-merges is provided.
(But, yes, as git-squash is porcelain this doesn't matter at all.)
Regards, Stephan
-- Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F