From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
Jon Schewe <jpschewe@mtu.net>,
spearce@spearce.org, git@vger.kernel.org
Subject: Re: Possible bug in git-completion.sh
Date: Fri, 8 Jan 2010 12:21:34 -0500 [thread overview]
Message-ID: <20100108172134.GA6344@coredump.intra.peff.net> (raw)
In-Reply-To: <7vskag1r5o.fsf@alter.siamese.dyndns.org>
On Fri, Jan 08, 2010 at 08:45:55AM -0800, Junio C Hamano wrote:
> > But just looking at the ls-files output, do you not agree that there is
> > a bug?
>
> If I agreed, I wouldn't have suggested _you_ to cd up and use pathspec,
> but instead would have suggested to patch ls-files to make it do so for
> you.
Ah, I missed the subtlety there.
> You can see it as a feature that you can use to check what would happen
> if you stopped ignoring the directory from the higher level. With a patch
> to always cd-up and use pathspec, that will become impossible.
>
> Maybe nobody needs such a feature (I don't), in which case we can declare
> it as a bug. But I wasn't ready to do so myself when I wrote the message
> you are responding to, and I still am not.
That feature seems somewhat insane to me. If I wanted to know how things
would look without gitignore, I would not have said --exclude-standard.
However, I was wrong before that it ignores .gitignore. It doesn't. If
you put "cruft" instead of "subdir" into gitignore in my previous
example, it is correctly ignored. So it is sort of a "half-use
gitignore", which you cannot accomplish any other way.
I still think it's a bit crazy to have as the default behavior. But at
least it's constrained to a plumbing command, which scripts can work
around to get what they want. With the current behavior, that means the
bash prompt code should be doing "git rev-parse --show-cdup --show-prefix"
and moving to the toplevel.
-Peff
next prev parent reply other threads:[~2010-01-08 17:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-08 15:17 Possible bug in git-completion.sh Jon Schewe
2010-01-08 15:40 ` Michael J Gruber
2010-01-08 16:24 ` Jeff King
2010-01-08 16:38 ` Junio C Hamano
2010-01-08 16:41 ` Jeff King
2010-01-08 16:45 ` Junio C Hamano
2010-01-08 16:56 ` Junio C Hamano
2010-01-08 17:24 ` Jeff King
2010-01-08 17:21 ` Jeff King [this message]
2010-01-08 18:21 ` Junio C Hamano
2010-01-08 19:58 ` Junio C Hamano
2010-01-08 23:01 ` [PATCH] ls-files: fix overeager pathspec optimization Junio C Hamano
2010-01-08 23:24 ` Linus Torvalds
2010-01-08 23:31 ` Junio C Hamano
2010-01-09 0:06 ` Junio C Hamano
2010-01-09 0:24 ` Linus Torvalds
2010-01-09 0:54 ` Junio C Hamano
2010-01-09 1:07 ` Linus Torvalds
2010-01-09 5:42 ` Jeff King
2010-01-09 7:16 ` Junio C Hamano
2010-01-09 7:35 ` [PATCH 1/4] t3001: test ls-files -o ignored/dir Junio C Hamano
2010-01-09 7:35 ` [PATCH 2/4] read_directory_recursive(): refactor handling of a single path into a separate function Junio C Hamano
2010-01-09 7:35 ` [PATCH 3/4] read_directory(): further split treat_path() Junio C Hamano
2010-01-09 7:35 ` [PATCH 4/4] ls-files: fix overeager pathspec optimization Junio C Hamano
2010-01-12 16:33 ` Jeff King
2010-01-09 8:07 ` [PATCH] " Junio C Hamano
2010-01-09 18:05 ` Linus Torvalds
2010-01-10 6:31 ` Junio C Hamano
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=20100108172134.GA6344@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jpschewe@mtu.net \
--cc=spearce@spearce.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).