threads / patch / 40752

patchcheck-ignore: correct documentation about output

Subject: [PATCH] check-ignore: correct documentation about output

## tl;dr

8 messages between Nov 8, 2015 and Nov 24, 2015. Diffs are folded; open one to read it.

replies: 7people: 3as markdown or json

Dennis Kaarsemaker· Nov 8, 2015, 20:10 UTC · lore

By default git check-ignore shows only the filenames that will be ignored, not the pattern that causes their exclusion.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
---
 Documentation/git-check-ignore.txt | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Show changes to Documentation/git-check-ignore.txt +3 −4
diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt
index 59531ab..0a628ac 100644
--- a/Documentation/git-check-ignore.txt
+++ b/Documentation/git-check-ignore.txt
@@ -16,10 +16,9 @@ DESCRIPTION
 -----------
 
 For each pathname given via the command-line or from a file via
-`--stdin`, show the pattern from .gitignore (or other input files to
-the exclude mechanism) that decides if the pathname is excluded or
-included.  Later patterns within a file take precedence over earlier
-ones.
+`--stdin`, check whether the file is excluded by .gitignore (or other
+input files to the exclude mechanism) and output the path if it is
+excluded.
 
 By default, tracked files are not shown at all since they are not
 subject to exclude rules; but see `--no-index'.
-- 
2.6.3-495-gf0a7f49


-- 
Dennis Kaarsemaker <dennis@kaarsemaker.net>
http://twitter.com/seveas
Dennis Kaarsemaker· Nov 16, 2015, 14:13 UTC · re: Dennis Kaarsemaker · lore

Re: [PATCH] check-ignore: correct documentation about output

Ping.
On zo, 2015-11-08 at 21:10 +0100, Dennis Kaarsemaker wrote:
Show 32 quoted lines
> By default git check-ignore shows only the filenames that will be
> ignored, not the pattern that causes their exclusion.
> 
> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
> ---
>  Documentation/git-check-ignore.txt | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/git-check-ignore.txt b/Documentation/git
> -check-ignore.txt
> index 59531ab..0a628ac 100644
> --- a/Documentation/git-check-ignore.txt
> +++ b/Documentation/git-check-ignore.txt
> @@ -16,10 +16,9 @@ DESCRIPTION
>  -----------
>  
>  For each pathname given via the command-line or from a file via
> -`--stdin`, show the pattern from .gitignore (or other input files to
> -the exclude mechanism) that decides if the pathname is excluded or
> -included.  Later patterns within a file take precedence over earlier
> -ones.
> +`--stdin`, check whether the file is excluded by .gitignore (or
> other
> +input files to the exclude mechanism) and output the path if it is
> +excluded.
>  
>  By default, tracked files are not shown at all since they are not
>  subject to exclude rules; but see `--no-index'.
> -- 
> 2.6.3-495-gf0a7f49
> 
> 
-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net
Stefan Beller· Nov 17, 2015, 00:22 UTC · re: Dennis Kaarsemaker · lore

Re: [PATCH] check-ignore: correct documentation about output

+cc Jeff

On Mon, Nov 16, 2015 at 6:13 AM, Dennis Kaarsemaker <dennis@kaarsemaker.net> wrote:

> Ping.

Junio is on vacation, so Jeff is our interim maintainer, and it seems he isn't up to full power as Junio. :)

Jeff King· Nov 17, 2015, 22:37 UTC · re: Stefan Beller · lore

Re: [PATCH] check-ignore: correct documentation about output

On Mon, Nov 16, 2015 at 04:22:16PM -0800, Stefan Beller wrote:
Show 8 quoted lines
> +cc Jeff
> 
> On Mon, Nov 16, 2015 at 6:13 AM, Dennis Kaarsemaker
> <dennis@kaarsemaker.net> wrote:
> > Ping.
> 
> Junio is on vacation, so Jeff is our interim maintainer,
> and it seems he isn't up to full power as Junio. :)

Yes, I'm sorry, I've been doing a terrible job so far, as I haven't pushed out anything. I'm making it my priority over the next day or so.

-Peff
Jeff King· Nov 20, 2015, 11:31 UTC · re: Dennis Kaarsemaker · lore

Re: [PATCH] check-ignore: correct documentation about output

On Sun, Nov 08, 2015 at 09:10:39PM +0100, Dennis Kaarsemaker wrote:
> By default git check-ignore shows only the filenames that will be
> ignored, not the pattern that causes their exclusion.
Yeah, I think the described behavior is really about the "-v" output.
Show 13 quoted lines
> --- a/Documentation/git-check-ignore.txt
> +++ b/Documentation/git-check-ignore.txt
> @@ -16,10 +16,9 @@ DESCRIPTION
>  -----------
>  
>  For each pathname given via the command-line or from a file via
> -`--stdin`, show the pattern from .gitignore (or other input files to
> -the exclude mechanism) that decides if the pathname is excluded or
> -included.  Later patterns within a file take precedence over earlier
> -ones.
> +`--stdin`, check whether the file is excluded by .gitignore (or other
> +input files to the exclude mechanism) and output the path if it is
> +excluded.

This just drops the mention of patterns entirely. Is the description of "-v" sufficient to cover this (especially I am thinking of the last-pattern-wins behavior)?

-Peff
Dennis Kaarsemaker· Nov 20, 2015, 20:29 UTC · re: Jeff King · lore

Re: [PATCH] check-ignore: correct documentation about output

[Peff, sorry for the duplicate mail. It seems I can't brain today...] 
On vr, 2015-11-20 at 06:31 -0500, Jeff King wrote:
Show 6 quoted lines
> On Sun, Nov 08, 2015 at 09:10:39PM +0100, Dennis Kaarsemaker wrote:
> 
> > By default git check-ignore shows only the filenames that will be
> > ignored, not the pattern that causes their exclusion.
> 
> Yeah, I think the described behavior is really about the "-v" output.
Yup.
Show 20 quoted lines
> > --- a/Documentation/git-check-ignore.txt
> > +++ b/Documentation/git-check-ignore.txt
> > @@ -16,10 +16,9 @@ DESCRIPTION
> >  -----------
> >  
> >  For each pathname given via the command-line or from a file via
> > -`--stdin`, show the pattern from .gitignore (or other input files
> > to
> > -the exclude mechanism) that decides if the pathname is excluded or
> > -included.  Later patterns within a file take precedence over
> > earlier
> > -ones.
> > +`--stdin`, check whether the file is excluded by .gitignore (or
> > other
> > +input files to the exclude mechanism) and output the path if it is
> > +excluded.
> 
> This just drops the mention of patterns entirely. Is the description 
> of "-v" sufficient to cover this (especially I am thinking of the
> last-pattern-wins behavior)?

The -v should then also describe precendence rules between files. Or maybe just link to gitignore(5).

-- 
Dennis Kaarsemaker
www.kaarsemaker.net
Dennis Kaarsemaker· Nov 20, 2015, 20:30 UTC · re: Dennis Kaarsemaker · lore

[PATCH v2] check-ignore: correct documentation about output

By default git check-ignore shows only the filenames that will be ignored, not the pattern that causes their exclusion. Instead of moving the partial exclude pattern precendence information to the -v option where it belongs, link to gitignore(5) which describes this more thoroughly.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
---
 Documentation/git-check-ignore.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Show changes to Documentation/git-check-ignore.txt +5 −5
diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt
index 59531ab..e94367a 100644
--- a/Documentation/git-check-ignore.txt
+++ b/Documentation/git-check-ignore.txt
@@ -16,10 +16,9 @@ DESCRIPTION
 -----------
 
 For each pathname given via the command-line or from a file via
-`--stdin`, show the pattern from .gitignore (or other input files to
-the exclude mechanism) that decides if the pathname is excluded or
-included.  Later patterns within a file take precedence over earlier
-ones.
+`--stdin`, check whether the file is excluded by .gitignore (or other
+input files to the exclude mechanism) and output the path if it is
+excluded.
 
 By default, tracked files are not shown at all since they are not
 subject to exclude rules; but see `--no-index'.
@@ -32,7 +31,8 @@ OPTIONS
 
 -v, --verbose::
 	Also output details about the matching pattern (if any)
-	for each given pathname.
+	for each given pathname. For precedence rules within and
+	between exclude sources, see linkgit:gitignore[5].
 
 --stdin::
 	Read pathnames from the standard input, one per line,
-- 
2.6.3-495-gf0a7f49


-- 
Dennis Kaarsemaker <dennis@kaarsemaker.net>
http://twitter.com/seveas
Jeff King· Nov 24, 2015, 22:13 UTC · re: Dennis Kaarsemaker · lore

Re: [PATCH v2] check-ignore: correct documentation about output

On Fri, Nov 20, 2015 at 09:30:48PM +0100, Dennis Kaarsemaker wrote:
Show 10 quoted lines
> By default git check-ignore shows only the filenames that will be
> ignored, not the pattern that causes their exclusion. Instead of moving
> the partial exclude pattern precendence information to the -v option
> where it belongs, link to gitignore(5) which describes this more
> thoroughly.
> 
> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
> ---
>  Documentation/git-check-ignore.txt | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
Thanks, your update looks good to me.
-Peff

← back to recent threads