git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Vincent van Ravesteijn <vfr@lyx.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH/resend] Documentation: update to git-merge-base --octopus
Date: Tue, 12 Apr 2011 14:45:58 -0500	[thread overview]
Message-ID: <20110412194558.GB1209@elie> (raw)
In-Reply-To: <4DA47A4D.80909@lyx.org>

Hi Vincent,

Vincent van Ravesteijn wrote:

> On the other hand, in the
> case without the --octopus parameter, it is necessary to supply a single commit
> and a set. Moreover, in the case of --octopus merging, a single commit is also valid,
> which is not the case otherwise.

So to summarize: unlike plain merge-base, merge-base --octopus only
requires at least one commit argument, and this patch updates the
synopsis to reflect that.  Good catch.

> 2) Add a sentence to the discussion that when --octopus is used, we do expect '2'
> as the result.

Adding an example use of --octopus to the DISCUSSION section makes a
lot of sense.  At first I thought this was being added to the
DESCRIPTION section, which led me to suggest something like the
following:

 DESCRIPTION
 -----------
 'git merge-base' finds best common ancestors between two commits to
 use in a three-way merge.  [... etc etc ...] can be more than one merge
 base for a pair of commits.

 OPERATION MODE
 --------------
 As the most common special case, specifying only two commits on the
 command line means computing the merge base between the given two
 commits.

 More generally, among the two commits to compute the merge base from,
 one is specified by the first commit argument on the command line;
 the other commit is a (possibly hypothetical) commit that is a merge
 across all the remaining commits on the command line.

 As a consequence, the merge base is not necessarily contained in each
 of the commit arguments if more than two commits are specified.
 This is different from git-show-branch(1) when used with
 the --merge-base option.

 --octopus::
	Compute the best common ancestors of all supplied commits, in
	preparation for an n-way merge.
	This mimics the behavior of 'git show-branch --merge-base'.

 --independent::
	Instead of ...

 OPTIONS
 -------
 -a::
 --all::
	...

 DISCUSSION
 ----------

What do you think?

> --- a/Documentation/git-merge-base.txt
> +++ b/Documentation/git-merge-base.txt
> @@ -9,7 +9,8 @@ git-merge-base - Find as good common ancestors as possible for a merge
[...]
> +When the option `--octopus` is given, the result of `git merge-base A B C`
> +will be '2', because '2' is the common ancestor of all branches.
> +

For what it's worth, except for Junio's wording nitpick and the log message,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

  parent reply	other threads:[~2011-04-12 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 16:14 [PATCH/resend] Documentation: update to git-merge-base --octopus Vincent van Ravesteijn
2011-04-12 17:31 ` Junio C Hamano
2011-04-12 19:45 ` Jonathan Nieder [this message]
2011-04-15  8:43   ` Vincent van Ravesteijn
2011-04-15 17:18     ` Junio C Hamano
2011-04-15  8:34 ` [PATCH v2 1/2] " Vincent van Ravesteijn
2011-04-15  8:38 ` [PATCH 2/2] Restructure documentation for git-merge-base Vincent van Ravesteijn

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110412194558.GB1209@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=vfr@lyx.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).