Re: [PATCH/RFC] blame: respect "core.ignorecase"

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

 



Am 09.09.2012 19:01, schrieb Ralf Thielow:
> If "core.ignorecase" is true, "git blame" fails
> when the given path differs to the real path in case
> sensitivity.
...
> +				dir = opendir(res.buf);
...
> +					struct dirent *ent = readdir(dir);
...
> +					if (!strcasecmp(p.buf, ent->d_name)) {

I don't think this is how core.ignorecase is intended to work. It does
not trigger case-insensitive lookup in the worktree (this is still done
by the OS), but it does a case-insensitive lookup in the index. That is,
given a worktree entry 'readme', it allows to find the index entry 'README'.

IMO, it is only correct that 'git blame file' operates on 'FILE' if
'FILE' exists in the index, and in only that case, it does not matter
how the 'file' is named in the worktree.

-- Hannes

--
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]