# [PATCH] Improve git-log documentation wrt file filters

3 messages from 2008-09-30 to 2008-09-30. Participants: martin f. krafft, Shawn O. Pearce.
Thread: https://gitlist.dev/t/15725

## martin f. krafft, 2008-09-30 14:36

Subject: [PATCH] Improve git-log documentation wrt file filters
Message-ID: <1222785372-32336-1-git-send-email-madduck@madduck.net>
URL: https://gitlist.dev/e/1222785372-32336-1-git-send-email-madduck%40madduck.net

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

Thanks to hyy <yiyihu@gmail.com> for his help.

Signed-off-by: martin f. krafft <madduck@madduck.net>
---
 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

```

## Shawn O. Pearce, 2008-09-30 19:25

Subject: Re: [PATCH] Improve git-log documentation wrt file filters
Message-ID: <20080930192553.GI21310@spearce.org>
URL: https://gitlist.dev/e/20080930192553.GI21310%40spearce.org
In-Reply-To: <1222785372-32336-1-git-send-email-madduck@madduck.net>

```
"martin f. krafft" <madduck@madduck.net> wrote:
> The need for "--" in the git-log synopsis was previously unclear and
> confusing. This patch makes it a little clearer.
 
> 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.

>  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.

```

## martin f. krafft, 2008-09-30 19:57

Subject: [PATCH] Improve git-log documentation wrt file filters
Message-ID: <1222804670-2833-1-git-send-email-madduck@madduck.net>
URL: https://gitlist.dev/e/1222804670-2833-1-git-send-email-madduck%40madduck.net
In-Reply-To: <20080930192553.GI21310@spearce.org>

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

Thanks to hyy <yiyihu@gmail.com> for his help.

Signed-off-by: martin f. krafft <madduck@madduck.net>
---
 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

```
