Re: [PATCH/RFC] git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 2, 2008, 23:50 UTC
- Message-ID
- <7vir04n0rt.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080302175820.31385.qmail@9e9c5b8314ca7b.315fe32.mid.smarden.org>
Gerrit Pape <pape@smarden.org> writes:
Show 14 quoted lines
> git-merge used to use either the --squash,--no-squash, --no-ff,--ff, > --no-commit,--commit option, whichever came last in the command line. > This lead to some un-intuitive behavior, having > > git merge --no-commit --no-ff <branch> > > actually commit the merge. Now git-merge respects --no-commit together > with --no-ff, as well as other combinations of the options. However, > this broke a selftest in t/t7600-merge.sh which expected to have --no-ff > completely override the --squash option, so that > > git merge --squash --no-ff <branch> > > fast-forwards, and makes a merge commit; now it prepares a squash ...
Both make sense when they make sense (i.e. if you and the other side are not fast-forward nor up-to-date and need a real merge).
> ... Combining --squash with --no-ff doesn't seem to make sense
Yeah, I think forbidding this combination would make much more sense. The former asks there be _no_ merge (the user does not want to have a merge ever), while the other one asks to create a merge even when there is no need to (the user does want a merge).
Are there other combinations that we should forbid?