All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sergey Organov <sorganov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-merge: mutually match SYNOPSIS and "usage".
Date: Tue, 07 Oct 2014 14:31:31 -0700	[thread overview]
Message-ID: <xmqq1tqjefd8.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <87bnpnsjrw.fsf@osv.gnss.ru> (Sergey Organov's message of "Wed, 08 Oct 2014 00:32:35 +0400")

Sergey Organov <sorganov@gmail.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
> ...
> I was looking at the merge.c code, and that's how it seems to work. You
> can get new semantics without -m, and you can't get old semantics with
> -m, isn't it? It looks like the set of descriptions I produced is
> formally correct.

The thing is, with "-m <msg>" we will never fall into the
traditional syntax, hence "git merge -m <msg> <msg> HEAD <commit>"
appear to be allowed with "git merge [options] <msg> HEAD
<commit>...", but it is not.

And the inverse is not true (an obvious example is "git merge
$branch", even though it does not have "-m <msg>" it uses the modern
& common.

So the updated SYNOPSIS is not really helping.

>> In other words, I agree with your motivation to call for attention
>> that the command behaves differently with and without "-m", but I do
>> not think that part of the change in this patch achieves it well.
>
> Any particular suggestion?

I was going to suggest "explain how the traditional syntax is
triggered in the DESCRIPTION section", but it turns out that we
already do that.

      The second syntax (<msg> HEAD <commit>...) is supported for
      historical reasons. Do not use it from the command line or in
      new scripts. It is the same as git merge -m <msg> <commit>....

Strictly speaking, I think it is not qute "the same"---I recall
vaguely that it broke tests if you replace the traditional-style
invocation in 'git pull' with the -m <msg> syntax, but I do not have
details handy; you may want to try it out if you are interested.

So I would think

	SYNOPSIS
        	git merge [options] <commit>...
		git merge [options] <msg> HEAD <commit>...
                git merge --abort

should be sufficient, possibly with some clarification on "The
second syntax" paragraph in the DESCRIPTION section.

  reply	other threads:[~2014-10-07 21:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 11:54 [PATCH] git-merge: mutually match SYNOPSIS and "usage" Sergey Organov
2014-10-07 18:34 ` Junio C Hamano
2014-10-07 20:32   ` Sergey Organov
2014-10-07 21:31     ` Junio C Hamano [this message]
2014-10-08 10:12       ` Sergey Organov

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=xmqq1tqjefd8.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sorganov@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.