Re: [PATCH] path_treatment: also ignore $GIT_DIR if it's not .git

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

> On Mon, Dec 2, 2013 at 2:04 AM, Dennis Kaarsemaker
> <dennis@xxxxxxxxxxxxxxx> wrote:
>> We always ignore anything named .git, but we should also ignore the git
>> directory if the user overrides it by setting $GIT_DIR
[...]
>> +       if (simplify_away(path->buf, path->len, simplify) || is_git_directory(path->buf))
>>                 return path_none;
>
> this adds 2 access, 1 lstat, 1 open, 1 read, 1 close to _every_ path
> we check. Is it worth the cost?

Moreover it is a much more inclusive check than what the commit message
claims: it will ignore anything that looks like a .git directory,
regardless of the name.  In particular GIT_DIR doesn't have anything to
do with it.

-- 
Thomas Rast
tr@xxxxxxxxxxxxx
--
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]