* "git ls-files -i" does not shows ignored files on Windows
@ 2009-05-26 17:36 Constantine Plotnikov
2009-05-27 3:37 ` Sitaram Chamarty
0 siblings, 1 reply; 2+ messages in thread
From: Constantine Plotnikov @ 2009-05-26 17:36 UTC (permalink / raw)
To: Git Mailing List
I have encountered a strange problem on Windows (cygwin git 1.6.1.2
and msys git version 1.6.2.2.1669.g7eaf8).
Lets execute the following sequence of commands:
git init
echo a >.gitignore
echo test >a
git ls-files -i --exclude-standard
The last command in the sequence gives an empty output. But "git
status" and "git ls-files -o --exclude-standard" show only
".gitignore" file as untracked. So the file "a" is considered as
ignored by git, but it is not displayed in output "git ls-files -i
--exclude-standard".
Does the bug happen on other platforms and versions of git?
Regards,
Constantine
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "git ls-files -i" does not shows ignored files on Windows
2009-05-26 17:36 "git ls-files -i" does not shows ignored files on Windows Constantine Plotnikov
@ 2009-05-27 3:37 ` Sitaram Chamarty
0 siblings, 0 replies; 2+ messages in thread
From: Sitaram Chamarty @ 2009-05-27 3:37 UTC (permalink / raw)
To: git
On 2009-05-26, Constantine Plotnikov <constantine.plotnikov@gmail.com> wrote:
> I have encountered a strange problem on Windows (cygwin git 1.6.1.2
> and msys git version 1.6.2.2.1669.g7eaf8).
>
> Lets execute the following sequence of commands:
>
> git init
> echo a >.gitignore
> echo test >a
> git ls-files -i --exclude-standard
>
> The last command in the sequence gives an empty output. But "git
> status" and "git ls-files -o --exclude-standard" show only
> ".gitignore" file as untracked. So the file "a" is considered as
> ignored by git, but it is not displayed in output "git ls-files -i
> --exclude-standard".
>
> Does the bug happen on other platforms and versions of git?
here's what works, after I used your 4 commands on an empty
directory. Numbers in parens added for the purpose of this
email, the rest is a straight paste:
$ git ls-files -i --exclude-standard -o (1)
a
$ git ls-files -o (2)
.gitignore
a
$ git add a
The following paths are ignored by one of your .gitignore
files:
a
Use -f if you really want to add them.
fatal: no files added
$ git add -f a
$ git ls-files -i --exclude-standard (3)
a
$
(1) your "a" is untracked right now, so ls-files seems to
consider it part of "other" files.
(2) and indeed, using just "-o" does show the file
(3) and when you forcibly add it, then you can see it with
your original command.
Yes, I agree it doesn't make too much sense. I have long
had the following aliases in my gitconfig:
ls-del = ls-files -d
ls-mod = ls-files -m # this will include deleted files also
ls-new = ls-files --exclude-standard -o
ls-ign = ls-files --exclude-standard -o -i
HTH and all that,
Sitaram
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-27 3:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 17:36 "git ls-files -i" does not shows ignored files on Windows Constantine Plotnikov
2009-05-27 3:37 ` Sitaram Chamarty
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).