From: Roland Schulz <roland@utk.edu>
To: git@vger.kernel.org
Subject: ls-files -i & directories
Date: Fri, 31 May 2013 16:22:37 -0400 [thread overview]
Message-ID: <CAO2Twbk5cvEa2uNKMg+n4DFokJ607yRDF0dUeBJkUOAY6BAD2A@mail.gmail.com> (raw)
Hi,
the gitignore rules work so that if a directory is ignored, all files
in that directory are ignored. While that behavior isn't clearly
documented in gitignore, this behavior is consistent across all git
tools (status, ls-files, ...).
An exception is that listing the ignored files using "ls-files -i"
doesn't behave the same way.
example:
$ mkdir d
$ touch d/f
$ echo /d/ > .gitignore
$ git ls-files -o --exclude-standard
.gitignore #d/f is correctly not listed
$ git ls-files -i --exclude-standard
#no output
d/f isn't listed even though it is treated as an ignored file by all
other git tools. That seems inconsistent to me. Is that behavior
intentionally or is this a bug?
A very similar question was asked before:
http://git.661346.n2.nabble.com/git-ls-files-ignored-and-ignored-directory-tt7570641.html
but without an answer.
Roland
--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
next reply other threads:[~2013-05-31 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 20:22 Roland Schulz [this message]
2013-05-31 21:20 ` ls-files -i & directories John Keeping
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=CAO2Twbk5cvEa2uNKMg+n4DFokJ607yRDF0dUeBJkUOAY6BAD2A@mail.gmail.com \
--to=roland@utk.edu \
--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).