git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-merge: mutually match SYNOPSIS and "usage".

From
Sergey Organov <sorganov@gmail.com>
Date
Oct 8, 2014, 10:12 UTC
Message-ID
<87h9zeg9an.fsf@osv.gnss.ru>
In-Reply-To
<xmqq1tqjefd8.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> 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.
No. When you see:
  git merge [options] [-m <msg>] <commit>...
Isn't it obvious that 'options' don't include "-m <msg>", so
  
  git merge [options] <msg> HEAD <commit>...

form will never apply when you have "-m <msg>" in the command, exaclty because 'options' don't include "-m <msg"?

>
> 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.
Sure, and this is covered as well.
> So the updated SYNOPSIS is not really helping.
I disagree, see above.

I still think that for somewhat messy historical situation, the suggested syntax description is good enough.

-- 
Sergey.
Previous: Junio C Hamano
Message 5 of 5 in “git-merge: mutually match SYNOPSIS and "usage".”
  1. git-merge: mutually match SYNOPSIS and "usage".Sergey Organov, Oct 7, 2014
  2. Junio C HamanoOct 7, 2014
  3. Sergey OrganovOct 7, 2014
  4. Junio C HamanoOct 7, 2014
  5. Sergey OrganovOct 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.