git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Tomas Carnecky <tom@dbservice.com>
Subject: Re: [PATCH] Documentation/checkout: clarify description
Date: Tue, 1 Jun 2010 02:10:47 -0400	[thread overview]
Message-ID: <20100601061046.GA7360@sigill.intra.peff.net> (raw)
In-Reply-To: <20100530084153.GA5447@progeny.tock>

On Sun, May 30, 2010 at 03:41:53AM -0500, Jonathan Nieder wrote:

> To the first-time reader, it may not be obvious that ‘git checkout’
> has two modes, nor that if no branch is specified it will read
> from the index.

OK, I can see how we might not explain the modes well, but...

> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index 4505eb6..99bd7f2 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -15,26 +15,32 @@ SYNOPSIS
>  
>  DESCRIPTION
>  -----------
> +Retrieves files from the index or specified tree and writes them
> +to the working tree.
>  
> -When <paths> are not given, this command switches branches by
> -updating the index, working tree, and HEAD to reflect the specified
> -branch.

How is this first paragraph helping? It seems to be describing just one
mode. You then go on to describe each mode in turn, which makes sense,
but this first paragraph just seems out of place. If you're going to say
anything, you should say "there are two different modes, one for X and
one for Y. The first mode is...".

> +'git checkout' [-b <new branch>] [<branch>]::
>  
> +	When <paths> are not given, this command switches branches by
> +	updating the index, working tree, and HEAD to reflect the
> +	specified branch.

In 76cfadf, I split this into

  git checkout [<branch>]
  git checkout -b <new branch> [<start_point>]

I wonder if we should do the same here (the distinction is that
<start_point> is treated differently from <branch>, especially with
respect to creating a detached HEAD).

Also, does it make sense to say "When <paths> are not given"? The "this
command" presumably refers to the one directly above, which has no
<paths>. Might it be easier to understand if we say "in this form of the
command" or something like that? Since we are now listing each form in
turn, the user can presumably figure out which form they are trying to
use.

-Peff

  reply	other threads:[~2010-06-01  6:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-30  8:41 [PATCH] Documentation/checkout: clarify description Jonathan Nieder
2010-06-01  6:10 ` Jeff King [this message]
2010-06-01  7:25   ` Jonathan Nieder

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=20100601061046.GA7360@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tom@dbservice.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).