From: Linus Torvalds <torvalds@osdl.org>
To: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Quick question
Date: Mon, 13 Feb 2006 08:54:31 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602130848220.3691@g5.osdl.org> (raw)
In-Reply-To: <43F0B577.4070608@gorzow.mm.pl>
On Mon, 13 Feb 2006, Radoslaw Szkodzinski wrote:
>
> How to display ignored files of the whole project using only core git?
>
> I've tried:
>
> git-ls-files -o -i -X .git/info/exclude
>
> and it only showed me the excluded files in the current directory...
Well, since you're telling it to only show excluded files, it will also
only show excluded directories.
Which is admittedly insane. You don't want to exclude directories. Or
maybe you do, but then we should add the "/" to the end before we do the
exclusion.
This patch (untested) will never exclude directories. Which may or may not
be the right thing.
Junio? Others? Comments?
Linus
---
diff --git a/ls-files.c b/ls-files.c
index 7024cf1..b923f92 100644
--- a/ls-files.c
+++ b/ls-files.c
@@ -276,8 +276,6 @@ static void read_directory(const char *p
continue;
len = strlen(de->d_name);
memcpy(fullname + baselen, de->d_name, len+1);
- if (excluded(fullname) != show_ignored)
- continue;
switch (DTYPE(de)) {
struct stat st;
@@ -304,6 +302,8 @@ static void read_directory(const char *p
case DT_LNK:
break;
}
+ if (excluded(fullname) != show_ignored)
+ continue;
add_name(fullname, baselen + len);
}
closedir(dir);
next prev parent reply other threads:[~2006-02-13 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-13 16:36 Quick question Radoslaw Szkodzinski
2006-02-13 16:54 ` Linus Torvalds [this message]
2006-02-13 18:26 ` Radoslaw Szkodzinski
2006-02-13 20:17 ` Alex Riesen
2006-02-14 7:52 ` Junio C Hamano
2006-02-14 0:40 ` Junio C Hamano
2006-02-14 1:50 ` Radoslaw Szkodzinski
2006-02-14 2:03 ` Junio C Hamano
2006-02-14 2:21 ` Radoslaw Szkodzinski
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 19:00 Quick Question Max Lucchetti
2012-03-01 19:35 ` Junio C Hamano
2012-03-01 19:45 ` Max Lucchetti
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0602130848220.3691@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=astralstorm@gorzow.mm.pl \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).