[PATCH] Improve git-log documentation wrt file filters

Subsystems: documentation, the rest

DORMANTno replies

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] Improve git-log documentation wrt file filters

From: martin f. krafft <hidden>
Date: 2016-06-15 22:45:25

The need for "--" in the git-log synopsis was previously unclear and
confusing. This patch makes it a little clearer.

Thanks to hyy [off-list ref] for his help.

Signed-off-by: martin f. krafft <redacted>
---
 Documentation/git-log.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 0446bad..b7409f8 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -8,7 +8,7 @@ git-log - Show commit logs
 
 SYNOPSIS
 --------
-'git log' <option>...
+'git log' [<options>] [<since>..<until>] [[--] <path>...]
 
 DESCRIPTION
 -----------
@@ -57,8 +57,10 @@ include::diff-options.txt[]
 	Note that only message is considered, if also a diff is shown
 	its size is not included.
 
-<path>...::
-	Show only commits that affect any of the specified paths.
+-- <path>...::
+	Show only commits that affect any of the specified paths. To
+        prevent confusion with options and branch names, paths should be
+        prefixed with "-- " to separate them from options or refnames.
 
 
 include::rev-list-options.txt[]
-- 
1.5.6.5

Re: [PATCH] Improve git-log documentation wrt file filters

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:25

"martin f. krafft" [off-list ref] wrote:
The need for "--" in the git-log synopsis was previously unclear and
confusing. This patch makes it a little clearer.
 
quoted hunk
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 0446bad..b7409f8 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -8,7 +8,7 @@ git-log - Show commit logs
 
 SYNOPSIS
 --------
-'git log' <option>...
+'git log' [<options>] [<since>..<until>] [[--] <path>...]
This part is really useful.
quoted hunk
 DESCRIPTION
 -----------
@@ -57,8 +57,10 @@ include::diff-options.txt[]
 	Note that only message is considered, if also a diff is shown
 	its size is not included.
 
-<path>...::
-	Show only commits that affect any of the specified paths.
+-- <path>...::
+	Show only commits that affect any of the specified paths. To
+        prevent confusion with options and branch names, paths should be
+        prefixed with "-- " to separate them from options or refnames.
Indentation here looks wrong, especially on the last two lines.

I'm also not sure we want to say "-- <path>" in the header for
this section.  The -- is optional but I'm reading this as though it
is required.  Maybe "... paths can be prefixed with -- ..." instead?

-- 
Shawn.

[PATCH] Improve git-log documentation wrt file filters

From: martin f. krafft <hidden>
Date: 2016-06-15 22:45:25

The need for "--" in the git-log synopsis was previously unclear and
confusing. This patch makes it a little clearer.

Thanks to hyy [off-list ref] for his help.

Signed-off-by: martin f. krafft <redacted>
---
 Documentation/git-log.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 0446bad..5a3a625 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -8,7 +8,7 @@ git-log - Show commit logs
 
 SYNOPSIS
 --------
-'git log' <option>...
+'git log' [<options>] [<since>..<until>] [[--] <path>...]
 
 DESCRIPTION
 -----------
@@ -57,8 +57,10 @@ include::diff-options.txt[]
 	Note that only message is considered, if also a diff is shown
 	its size is not included.
 
-<path>...::
-	Show only commits that affect any of the specified paths.
+[--] <path>...::
+	Show only commits that affect any of the specified paths. To
+	prevent confusion with options and branch names, paths may need to be
+	prefixed with "-- " to separate them from options or refnames.
 
 
 include::rev-list-options.txt[]
-- 
1.5.6.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help