git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Mark Lodato <lodatom@gmail.com>
To: git@vger.kernel.org
Cc: Mark Lodato <lodatom@gmail.com>
Subject: [PATCH/RFC 12/12] diff docs: remove <rev>{0,2} notation
Date: Fri, 12 Mar 2010 23:53:04 -0500	[thread overview]
Message-ID: <1268455984-19061-13-git-send-email-lodatom@gmail.com> (raw)
In-Reply-To: <1268455984-19061-1-git-send-email-lodatom@gmail.com>

This notation is not used anywhere else, so it can be confusing when
first encountered.  Instead, prefer the slightly longer but just as
clear "[<rev> [<rev>]]", which is consistent with other commands.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
When I first ran `git diff -h` and I saw the old syntax, I was rather
confused.  It took me a minute to realize that this was the regular
expression syntax.  I think it's best to stick with one syntax, even if
it is a bit more verbose.

 Documentation/git-diff.txt     |    2 +-
 Documentation/git-difftool.txt |    2 +-
 builtin/diff.c                 |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 4582179..e2d868d 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -8,7 +8,7 @@ git-diff - Show changes between commits, commit and working tree, etc
 
 SYNOPSIS
 --------
-'git diff' [<common diff options>] <commit>{0,2} [--] [<path>...]
+'git diff' [<common diff options>] [<commit> [<commit>]] [--] [<path>...]
 
 DESCRIPTION
 -----------
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt
index 8250bad..a02e3b5 100644
--- a/Documentation/git-difftool.txt
+++ b/Documentation/git-difftool.txt
@@ -7,7 +7,7 @@ git-difftool - Show changes using common diff tools
 
 SYNOPSIS
 --------
-'git difftool' [<options>] <commit>{0,2} [--] [<path>...]
+'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...]
 
 DESCRIPTION
 -----------
diff --git a/builtin/diff.c b/builtin/diff.c
index f73da93..e2e2efc 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -21,7 +21,7 @@ struct blobinfo {
 };
 
 static const char builtin_diff_usage[] =
-"git diff [<options>] <rev>{0,2} [--] [<path>...]";
+"git diff [<options>] [<rev> [<rev>]] [--] [<path>...]";
 
 static void stuff_change(struct diff_options *opt,
 			 unsigned old_mode, unsigned new_mode,
-- 
1.7.0.2

      parent reply	other threads:[~2010-03-13  4:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13  4:52 [PATCH/RFC 00/12] docs: use metavariables consistently Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 01/12] commit-tree: allow indirect tree references Mark Lodato
2010-03-13 21:58   ` Junio C Hamano
2010-03-16  0:44     ` Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 02/12] grep docs: grep accepts a <tree-ish>, not a <tree> Mark Lodato
2010-03-13 21:59   ` Junio C Hamano
2010-03-16  0:47     ` Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 03/12] fsck docs: remove outdated and useless diagnostic Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 04/12] docs: use <sha1> to mean unabbreviated ID Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 05/12] docs: differentiate between <tag> and <tagname> Mark Lodato
2010-03-13 21:53   ` Junio C Hamano
2010-03-13  4:52 ` [PATCH/RFC 06/12] docs: clarify <object>, <commit>, <tree-ish>, etc Mark Lodato
2010-03-13  4:52 ` [PATCH/RFC 07/12] docs: use <tree> instead of <tree-ish> Mark Lodato
2010-03-13  4:53 ` [PATCH/RFC 08/12] http-fetch docs: use <commit-id> consistently Mark Lodato
2010-03-13  4:53 ` [PATCH/RFC 09/12] docs: use <commit> instead of <commit-ish> Mark Lodato
2010-03-13 22:05   ` Junio C Hamano
2010-03-16  1:12     ` Mark Lodato
2010-03-13  4:53 ` [PATCH/RFC 10/12] diff: use brackets for optional args in usage Mark Lodato
2010-03-13  4:53 ` [PATCH/RFC 11/12] docs: use ... instead of * for multiplicity Mark Lodato
2010-03-13  4:53 ` Mark Lodato [this message]

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=1268455984-19061-13-git-send-email-lodatom@gmail.com \
    --to=lodatom@gmail.com \
    --cc=git@vger.kernel.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).