From: Junio C Hamano <gitster@pobox.com>
To: Sergei Organov <osv@javad.com>
Cc: git@vger.kernel.org
Subject: Re: git-merge: inconsistent manual page.
Date: Tue, 30 Oct 2007 11:54:11 -0700 [thread overview]
Message-ID: <7vk5p4l9gs.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vsl3sla5q.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 30 Oct 2007 11:39:13 -0700")
Subject: git-merge: document but discourage the historical syntax
Historically "git merge" took its command line arguments in a
rather strange order. Document the historical syntax, and also
document clearly that it is not encouraged in new scripts.
There is no reason to deprecate the historical syntax, as the
current code can sanely tell which syntax the caller is using,
and existing scripts by people do use the historical syntax.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Junio C Hamano <gitster@pobox.com> writes:
> See above. We do not want to advertise the crazy syntax.
By the way, I kept saying "crazy" above, but the thing is that
when Linus did that "crazy" syntax, it was not crazy at all.
Simply it did not matter, as nobody was supposed to use "git
merge" from the command line.
Instead, when merging a local branch, you would just have said:
$ git pull . $my_other_branch
It became a "crazy historical syntax" only after people started
talking about using it from the command line, giving it other
command line options. And at that point, we introduced -m flag
and stopped requiring the second token 'HEAD'.
With that in mind, this might be a better alternative.
Documentation/git-merge.txt | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index bca4212..a056b40 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -11,6 +11,7 @@ SYNOPSIS
[verse]
'git-merge' [-n] [--summary] [--no-commit] [--squash] [-s <strategy>]...
[-m <msg>] <remote> <remote>...
+'git-merge' <msg> HEAD <remote>...
DESCRIPTION
-----------
@@ -43,6 +44,11 @@ If you tried a merge which resulted in a complex conflicts and
would want to start over, you can recover with
gitlink:git-reset[1].
+The second syntax (<msg> `HEAD` <remote>) is supported for
+historical reasons. Do not use it from the command line or in
+new scripts.
+
+
CONFIGURATION
-------------
next prev parent reply other threads:[~2007-10-30 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 13:22 git-merge: inconsistent manual page Sergei Organov
2007-10-30 18:39 ` Junio C Hamano
2007-10-30 18:54 ` Junio C Hamano [this message]
2007-10-30 19:32 ` Sergei Organov
2007-10-31 0:05 ` Junio C Hamano
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=7vk5p4l9gs.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=osv@javad.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 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).