Re: Possible bug in git-completion.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]