Re: Possible bug in git-completion.sh
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 8, 2010, 16:38 UTC
- Message-ID
- <7vr5q05z74.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100108162404.GA5799@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> Try this: > > git init > touch base-cruft > mkdir subdir > touch subdir/cruft > echo subdir >.gitignore > git status ;# shows gitignore and base-cruft > git ls-files -o --exclude-standard ;# ditto > cd subdir > git status . ;# shows nothing, since everything in subdir is ignored > git ls-files -o --exclude-standard ;# BUG: shows cruft > > Yes, ls-files operates in the subdirectory, which means it should not > show cruft from the root (and it does not). But it should respect > .gitignore directives going all the way back to the root, and it > doesn't.
Shouldn't the ls-files be run from the root with subdir/ as pathspec, if you wanted to do apples-to-apples comparison between it and status?