From: Junio C Hamano <gitster@pobox.com>
To: Gerrit Pape <pape@smarden.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
Date: Sun, 02 Mar 2008 15:50:46 -0800 [thread overview]
Message-ID: <7vir04n0rt.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080302175820.31385.qmail@9e9c5b8314ca7b.315fe32.mid.smarden.org> (Gerrit Pape's message of "Sun, 2 Mar 2008 17:58:19 +0000")
Gerrit Pape <pape@smarden.org> writes:
> 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?
next prev parent reply other threads:[~2008-03-02 23:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-02 17:58 [PATCH/RFC] git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options Gerrit Pape
2008-03-02 23:50 ` Junio C Hamano [this message]
2008-03-03 9:22 ` [PATCH] " Gerrit Pape
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vir04n0rt.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pape@smarden.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).