git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Albert Netymk <albertnetymk@gmail.com>, git@vger.kernel.org
Subject: Re: git-diff-index man page
Date: Sun, 19 May 2013 23:27:43 -0700	[thread overview]
Message-ID: <20130520062743.GA2919@elie.Belkin> (raw)
In-Reply-To: <7vr4h2w8gv.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:

> --- a/Documentation/git-diff-index.txt
> +++ b/Documentation/git-diff-index.txt
> @@ -3,7 +3,7 @@ git-diff-index(1)
>  
>  NAME
>  ----
> -git-diff-index - Compares content and mode of blobs between the index and repository
> +git-diff-index - Compare a tree and the working tree or the index

Looks good.  I think it scans better with the second "the" left out:

	git diff-index - Compare a tree to the working tree or index

[...]
> @@ -13,11 +13,12 @@ SYNOPSIS
>  
>  DESCRIPTION
>  -----------
> -Compares the content and mode of the blobs found via a tree
> +Compare the content and mode of the blobs found in a tree object

I think this s/Compares/Compare/ is a regression: traditionally
the DESCRIPTION sections of manpages describe what a command does in
the present indicative ("When paths are specified, compares only those
named paths"), freeing up the imperative for cases where it is useful
to instruct the user about what to do.

The s/via/in/ looks fine.

> -object with the content of the current index and, optionally
> +with the corresponding tracked file in the working tree, or with the

Since they are being compared to blobs, "file" should be "files" here.

> -ignoring the stat state of the file on disk.  When paths are
> -specified, compares only those named paths.  Otherwise all
> -entries in the index are compared.
> +corresponding paths in the index.  When paths are specified,
> +compares only those named paths.  Otherwise all entries in the index
> +are compared.

The <path> parameters to git diff-index are pathspecs and not literal
paths.

This should say somewhere that this only looks at paths in the index
and that untracked files are ignored.  Perhaps something as simple
as s/entries in the index/tracked files/ would do the trick.

Thanks and hope that helps,
Jonathan

diff --git i/Documentation/git-diff-index.txt w/Documentation/git-diff-index.txt
index 58308e15..a86cf62e 100644
--- i/Documentation/git-diff-index.txt
+++ w/Documentation/git-diff-index.txt
@@ -3,7 +3,7 @@ git-diff-index(1)
 
 NAME
 ----
-git-diff-index - Compare a tree and the working tree or the index
+git-diff-index - Compare a tree to the working tree or index
 
 
 SYNOPSIS
@@ -13,12 +13,11 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-
-Compare the content and mode of the blobs found in a tree object
-with the corresponding tracked file in the working tree, or with the
-corresponding paths in the index.  When paths are specified,
-compares only those named paths.  Otherwise all entries in the index
-are compared.
+Compares the content and mode of the blobs found in a tree object
+with the corresponding tracked files in the working tree, or with the
+corresponding paths in the index.  When <path> arguments are present,
+compares only paths matching those patterns.  Otherwise all tracked
+files are compared.
 
 OPTIONS
 -------

  parent reply	other threads:[~2013-05-20  6:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18 16:26 git-diff-index man page Albert Netymk
2013-05-19  7:46 ` Junio C Hamano
2013-05-19 20:23   ` Albert Netymk
2013-05-20  5:01     ` Junio C Hamano
2013-05-20  5:40       ` Eric Sunshine
2013-05-20  6:27       ` Jonathan Nieder [this message]
2013-05-20 22:48         ` 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=20130520062743.GA2919@elie.Belkin \
    --to=jrnieder@gmail.com \
    --cc=albertnetymk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).