* Quick question
@ 2006-02-13 16:36 Radoslaw Szkodzinski
2006-02-13 16:54 ` Linus Torvalds
2006-02-14 0:40 ` Junio C Hamano
0 siblings, 2 replies; 12+ messages in thread
From: Radoslaw Szkodzinski @ 2006-02-13 16:36 UTC (permalink / raw)
To: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
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...
--
GPG Key id: 0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
AstralStorm
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-13 16:36 Quick question Radoslaw Szkodzinski
@ 2006-02-13 16:54 ` Linus Torvalds
2006-02-13 18:26 ` Radoslaw Szkodzinski
2006-02-14 7:52 ` Junio C Hamano
2006-02-14 0:40 ` Junio C Hamano
1 sibling, 2 replies; 12+ messages in thread
From: Linus Torvalds @ 2006-02-13 16:54 UTC (permalink / raw)
To: Radoslaw Szkodzinski; +Cc: Git Mailing List
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);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-13 16:54 ` Linus Torvalds
@ 2006-02-13 18:26 ` Radoslaw Szkodzinski
2006-02-13 20:17 ` Alex Riesen
2006-02-14 7:52 ` Junio C Hamano
1 sibling, 1 reply; 12+ messages in thread
From: Radoslaw Szkodzinski @ 2006-02-13 18:26 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
Linus Torvalds wrote:
>
> 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?
>
For me it seems to do the right thing, although I have no need to exclude directories.
If I really needed to, I'd say something like:
/excluded_dir/*
in .git/info/exclude, and it would show the files as being excluded.
--
GPG Key id: 0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
AstralStorm
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-13 18:26 ` Radoslaw Szkodzinski
@ 2006-02-13 20:17 ` Alex Riesen
0 siblings, 0 replies; 12+ messages in thread
From: Alex Riesen @ 2006-02-13 20:17 UTC (permalink / raw)
To: Radoslaw Szkodzinski; +Cc: Linus Torvalds, Git Mailing List
Radoslaw Szkodzinski, Mon, Feb 13, 2006 19:26:03 +0100:
> Linus Torvalds wrote:
> >
> > 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.
I actually quiet like it how it is.
> > Junio? Others? Comments?
> >
>
> For me it seems to do the right thing, although I have no need to exclude directories.
> If I really needed to, I'd say something like:
>
> /excluded_dir/*
>
> in .git/info/exclude, and it would show the files as being excluded.
>
What's wrong with .gitignore in the excluded_dir containing everything
you don't want to see, or even just "*"?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-13 16:36 Quick question Radoslaw Szkodzinski
2006-02-13 16:54 ` Linus Torvalds
@ 2006-02-14 0:40 ` Junio C Hamano
2006-02-14 1:50 ` Radoslaw Szkodzinski
1 sibling, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2006-02-14 0:40 UTC (permalink / raw)
To: Radoslaw Szkodzinski; +Cc: git
Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> writes:
> 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...
With the git.git repository itself, I tried:
$ cat /var/tmp/i
*.c
$ git ls-files -i -X /var/tmp/i | head -n 6
apply.c
arm/sha1.c
blob.c
cat-file.c
check-ref-format.c
checkout-index.c
So I am not sure what you mean. You wanted to "display ignored
files of the whole project", right? I am getting arm/sha1.c
here in my output, so I do not understand the issue here...
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-14 0:40 ` Junio C Hamano
@ 2006-02-14 1:50 ` Radoslaw Szkodzinski
2006-02-14 2:03 ` Junio C Hamano
0 siblings, 1 reply; 12+ messages in thread
From: Radoslaw Szkodzinski @ 2006-02-14 1:50 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
Junio C Hamano wrote:
> With the git.git repository itself, I tried:
>
> $ cat /var/tmp/i
> *.c
> $ git ls-files -i -X /var/tmp/i | head -n 6
> apply.c
> arm/sha1.c
> blob.c
> cat-file.c
> check-ref-format.c
> checkout-index.c
>
> So I am not sure what you mean. You wanted to "display ignored
> files of the whole project", right? I am getting arm/sha1.c
> here in my output, so I do not understand the issue here...
>
Wrong. I wanted to display files that are ignored and not checked in.
(unlike your example)
That's why I used the -o (--others).
Try your example with git repo's .gitignore and any .o file.
I would like to use it for backup~ hunting purposes in a script
and not have to worry about find and other less portable tools.
--
GPG Key id: 0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
AstralStorm
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-14 1:50 ` Radoslaw Szkodzinski
@ 2006-02-14 2:03 ` Junio C Hamano
2006-02-14 2:21 ` Radoslaw Szkodzinski
0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2006-02-14 2:03 UTC (permalink / raw)
To: Radoslaw Szkodzinski; +Cc: git
Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> writes:
> Wrong. I wanted to display files that are ignored and not checked in.
> (unlike your example)
Wow, you have a strong voice.
> That's why I used the -o (--others).
You asked it to show either ignored or others.
> I would like to use it for backup~ hunting purposes in a script
> and not have to worry about find and other less portable tools.
I usually do this for that:
git ls-files -o '*~'
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-14 2:03 ` Junio C Hamano
@ 2006-02-14 2:21 ` Radoslaw Szkodzinski
0 siblings, 0 replies; 12+ messages in thread
From: Radoslaw Szkodzinski @ 2006-02-14 2:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
Junio C Hamano wrote:
> Wow, you have a strong voice.
>
I didn't want to sound rude at all, of course.
>> That's why I used the -o (--others).
>
> You asked it to show either ignored or others.
>
So here's the catch? I don't think so.
But the manpage isn't totally clear in this matter.
When I specify just -o, it gives me files which weren't ignored too.
-o -i gives me only ignored files.
Plain -i returns nothing.
With git directory, compare:
git-ls-files -o -i -X .gitignore
with:
git-ls-files -o
The remainder is:
git-ls-files -o -X .gitignore
I have the documentation built.
(Yes, I'm not including its .gitignore on purpose)
>
>> I would like to use it for backup~ hunting purposes in a script
>> and not have to worry about find and other less portable tools.
>
> I usually do this for that:
>
> git ls-files -o '*~'
>
Also good. I have *~ in ignored too, so I think -o -i will suffice.
--
GPG Key id: 0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
AstralStorm
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick question
2006-02-13 16:54 ` Linus Torvalds
2006-02-13 18:26 ` Radoslaw Szkodzinski
@ 2006-02-14 7:52 ` Junio C Hamano
1 sibling, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2006-02-14 7:52 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git, Radoslaw Szkodzinski
Linus Torvalds <torvalds@osdl.org> writes:
> 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
I might have sounded negative or happy with status quo in my
earlier messages but that was not intended. I am swamped and
have not formed an opinion.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Quick Question
@ 2012-03-01 19:00 Max Lucchetti
2012-03-01 19:35 ` Junio C Hamano
0 siblings, 1 reply; 12+ messages in thread
From: Max Lucchetti @ 2012-03-01 19:00 UTC (permalink / raw)
To: git@vger.kernel.org
I wanted to confirm that your product "Git" is free for the US government to use? If you cannot answer this question, would you know who could?
Thank you very much for your time,
Max Lucchetti
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Quick Question
2012-03-01 19:00 Quick Question Max Lucchetti
@ 2012-03-01 19:35 ` Junio C Hamano
2012-03-01 19:45 ` Max Lucchetti
0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2012-03-01 19:35 UTC (permalink / raw)
To: Max Lucchetti; +Cc: git@vger.kernel.org
Max Lucchetti <mlucchetti@its.bldrdoc.gov> writes:
> I wanted to confirm that your product "Git" is free for the US
> government to use?
As far as _we_ are concerned, anybody should be able to use it for free
(as both in "libre" and in "gratis" sense); it is licensed under GPLv2 and
the copy of the license is found in COPYING file. Some part is licensed
under BSD license, but that shouldn't change the picture.
Having said that we are in no position of knowing if the branch of the US
goverment you work for has its own restriction regarding its software
procurement process (e.g. "It has to be produced by an ISO 14000 certified
facility"). So...
> If you cannot answer this question, would you know who could?
...if this is a legal inquiry, only _your_ lawyer can answer it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Quick Question
2012-03-01 19:35 ` Junio C Hamano
@ 2012-03-01 19:45 ` Max Lucchetti
0 siblings, 0 replies; 12+ messages in thread
From: Max Lucchetti @ 2012-03-01 19:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git@vger.kernel.org
Got it! Thanks again for your time.
-Max
-----Original Message-----
From: Junio C Hamano [mailto:gitster@pobox.com]
Sent: Thursday, March 01, 2012 12:36 PM
To: Max Lucchetti
Cc: git@vger.kernel.org
Subject: Re: Quick Question
Max Lucchetti <mlucchetti@its.bldrdoc.gov> writes:
> I wanted to confirm that your product "Git" is free for the US
> government to use?
As far as _we_ are concerned, anybody should be able to use it for free (as both in "libre" and in "gratis" sense); it is licensed under GPLv2 and the copy of the license is found in COPYING file. Some part is licensed under BSD license, but that shouldn't change the picture.
Having said that we are in no position of knowing if the branch of the US goverment you work for has its own restriction regarding its software procurement process (e.g. "It has to be produced by an ISO 14000 certified facility"). So...
> If you cannot answer this question, would you know who could?
...if this is a legal inquiry, only _your_ lawyer can answer it.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-03-01 19:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 16:36 Quick question Radoslaw Szkodzinski
2006-02-13 16:54 ` Linus Torvalds
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
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).