git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] git-diff.txt: group the [--] and [<path>...] templates

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Apr 24, 2013, 16:33 UTC
Message-ID
<1366821216-20868-4-git-send-email-artagnon@gmail.com>
In-Reply-To
<1366821216-20868-1-git-send-email-artagnon@gmail.com>

Clarify that "--" is meant to disambiguate paths from the other options.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Documentation/git-diff.txt | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 47aa3fc..a0fdfc2 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -9,11 +9,11 @@ git-diff - Show changes between commits, commit and working tree, etc
 SYNOPSIS
 --------
 [verse]
-'git diff' [options] [<commit>] [--] [<path>...]
-'git diff' [options] --cached [<commit>] [--] [<path>...]
+'git diff' [options] [<commit>] [[--] [<path>...]]
+'git diff' [options] --cached [<commit>] [[--] [<path>...]]
 'git diff' [options] <blob> <blob>
-'git diff' [options] <commit> <commit> [--] [<path>...]
-'git diff' [options] [--no-index] [--] <path> <path>
+'git diff' [options] <commit> <commit> [[--] [<path>...]]
+'git diff' [options] [--no-index] [[--] <path> <path>]
 
 DESCRIPTION
 -----------
@@ -21,7 +21,7 @@ Show changes between the working tree and the index or a tree, changes
 between the index and a tree, changes between two trees, or changes
 between two files on disk.
 
-'git diff' [options] [--] [<path>...]::
+'git diff' [options] [[--] [<path>...]]::
 
 	This form is to view the changes you made relative to
 	the index (staging area for the next commit).  In other
@@ -33,7 +33,7 @@ If exactly two paths are given and at least one points outside
 the current repository, 'git diff' will compare the two files /
 directories. This behavior can be forced by --no-index.
 
-'git diff' [options] --cached [<commit>] [--] [<path>...]::
+'git diff' [options] --cached [<commit>] [[--] [<path>...]]::
 
 	This form is to view the changes you staged for the next
 	commit relative to the named <commit>.  Typically you
@@ -43,7 +43,7 @@ directories. This behavior can be forced by --no-index.
 	<commit> is not given, it shows all staged changes.
 	--staged is a synonym of --cached.
 
-'git diff' [options] <commit> [--] [<path>...]::
+'git diff' [options] <commit> [[--] [<path>...]]::
 
 	This form is to view the changes you have in your
 	working tree relative to the named <commit>.  You can
@@ -56,18 +56,18 @@ directories. This behavior can be forced by --no-index.
 	This form is to view the differences between the raw
 	contents of two blob objects.
 
-'git diff' [options] <commit> <commit> [--] [<path>...]::
+'git diff' [options] <commit> <commit> [[--] [<path>...]]::
 
 	This is to view the changes between two arbitrary
 	<commit>.
 
-'git diff' [options] <commit>..<commit> [--] [<path>...]::
+'git diff' [options] <commit>..<commit> [[--] [<path>...]]::
 
 	This is synonymous to the previous form.  If <commit> on
 	one side is omitted, it will have the same effect as
 	using HEAD instead.
 
-'git diff' [options] <commit>\...<commit> [--] [<path>...]::
+'git diff' [options] <commit>\...<commit> [[--] [<path>...]]::
 
 	This form is to view the changes on the branch containing
 	and up to the second <commit>, starting at a common ancestor
-- 
1.8.2.1.502.g2d60b5c
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 39 in “Documentation/git-diff.txt improvements”
  1. 0/5 Documentation/git-diff.txt improvementsRamkumar Ramachandra, Apr 24, 2013
  2. 1/5 git-diff.txt: reorder the <commit> <commit> formRamkumar Ramachandra, Apr 24, 2013
  3. Jonathan NiederApr 24, 2013
  4. 2/5 git-diff.txt: strip the leading "--" from options templateRamkumar Ramachandra, Apr 24, 2013
  5. Jonathan NiederApr 24, 2013
  6. Ramkumar RamachandraApr 24, 2013
  7. Junio C HamanoApr 24, 2013
  8. 3/5 git-diff.txt: group the [--] and [<path>...] templatesRamkumar Ramachandra, Apr 24, 2013
  9. Junio C HamanoApr 24, 2013
  10. Ramkumar RamachandraApr 24, 2013
  11. Junio C HamanoApr 24, 2013
  12. Ramkumar RamachandraApr 24, 2013
  13. Junio C HamanoApr 24, 2013
  14. Ramkumar RamachandraApr 24, 2013
  15. Jonathan NiederApr 24, 2013
  16. 4/5 git-diff.txt: document the .. and ... forms in SYNOPSISRamkumar Ramachandra, Apr 24, 2013
  17. Jonathan NiederApr 24, 2013
  18. 5/5 git-diff.txt: fix ordering of the [--no-index] formRamkumar Ramachandra, Apr 24, 2013
  19. Junio C HamanoApr 24, 2013
  20. Ramkumar RamachandraApr 24, 2013
  21. Jonathan NiederApr 24, 2013
  22. Ramkumar RamachandraApr 24, 2013
  23. Jonathan NiederApr 24, 2013
  24. Ramkumar RamachandraApr 24, 2013
  25. Jonathan NiederApr 24, 2013
  26. Ramkumar RamachandraApr 24, 2013
  27. Jonathan NiederApr 24, 2013
  28. Ramkumar RamachandraApr 24, 2013
  29. Jonathan NiederApr 24, 2013
  30. Ramkumar RamachandraApr 24, 2013
  31. 6/5 git-diff.txt: banish the <commit>..<commit> formRamkumar Ramachandra, Apr 24, 2013
  32. Junio C HamanoApr 24, 2013
  33. Ramkumar RamachandraApr 24, 2013
  34. Ramkumar RamachandraApr 25, 2013
  35. Junio C HamanoApr 29, 2013
  36. Ramkumar RamachandraApr 29, 2013
  37. Junio C HamanoApr 29, 2013
  38. Ramkumar RamachandraApr 29, 2013
  39. Junio C HamanoApr 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.