git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Sitaram Chamarty <sitaramc@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] give exclude mechanism a debug option
Date: Sun, 08 Feb 2009 01:50:27 -0800	[thread overview]
Message-ID: <7vmycxz28s.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090208085933.GB4392@coredump.intra.peff.net> (Jeff King's message of "Sun, 8 Feb 2009 03:59:33 -0500")

Jeff King <peff@peff.net> writes:

> On Sat, Feb 07, 2009 at 01:45:44PM -0800, Junio C Hamano wrote:
>
>> > Because I would expect "git check-ignore foo/bar | grep ^foo/bar:" to
>> > tell me if and how foo/bar is being excluded. But I have to instead
>> > check for ^foo and ^foo/bar.
>> 
>> Sorry, I do not understand why you need the downstream pipe that filters
>> using grep to begin with.
>
> Sorry, I should have been more clear. The grep was meant to simulate
> what my eyes and brain are doing. That is, if I ask "what are patterns
> affecting foo/bar?", I expect to see "foo/bar" in the output.

Oh, then the output format would, just like "grep" given more than one
file tells which file it found the match in, talk about which path the
output entry talks about when given more than one path.

Something like:

	$ git check-ignore foo/bar xyzzy~ hello.c
	foo/bar: foo/.gitignore:4: ??r
        xyzzy~: .git/info/excludes:22: *~

that says "foo/bar is ignored because line 4 of foo/.gitignore tells us to
ignore any three-letter filename that ends with r, xyzzy~ is ignored
because .git/info/excludes tells us to ignore everything that ends with
tilde on line 22, and hello.c is not ignored at all."

  reply	other threads:[~2009-02-08  9:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06  9:38 How to find out which gitignore blocks my git-add Gonzo
2009-02-06 19:33 ` Jeff King
2009-02-07  1:33   ` Sitaram Chamarty
2009-02-07  6:42     ` Jeff King
2009-02-07  6:44       ` [PATCH 1/2] refactor exclude handling Jeff King
2009-02-07  6:44       ` [PATCH 2/2] give exclude mechanism a debug option Jeff King
2009-02-07  7:38         ` Junio C Hamano
2009-02-07  7:42           ` Junio C Hamano
2009-02-07 11:46             ` Jeff King
2009-02-07 11:44           ` Jeff King
2009-02-07 21:45             ` Junio C Hamano
2009-02-08  8:59               ` Jeff King
2009-02-08  9:50                 ` Junio C Hamano [this message]
2009-02-08  9:52                   ` Jeff King
2009-02-07 12:44       ` How to find out which gitignore blocks my git-add Sitaram Chamarty
2009-02-07 13:31         ` Jeff King
2009-02-06 22:00 ` Bisani, Alok

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=7vmycxz28s.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sitaramc@gmail.com \
    /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).