git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Sixt <j6t@kdbg.org>
Date
Sep 9, 2012, 19:03 UTC
Message-ID
<504CE7F2.9010306@kdbg.org>
In-Reply-To
<1347210113-27435-1-git-send-email-ralf.thielow@gmail.com>
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
Previous: Ralf ThielowNext: Junio C Hamano
Message 2 of 12 in “blame: respect "core.ignorecase"”
  1. blame: respect "core.ignorecase"Ralf Thielow, Sep 9, 2012
  2. Johannes SixtSep 9, 2012
  3. Junio C HamanoSep 9, 2012
  4. Junio C HamanoSep 9, 2012
  5. blame: allow "blame file" in the middle of a conflicted mergeJunio C Hamano, Sep 11, 2012
  6. Ralf ThielowSep 10, 2012
  7. Jeff KingSep 10, 2012
  8. Junio C HamanoSep 10, 2012
  9. Jeff KingSep 10, 2012
  10. Junio C HamanoSep 10, 2012
  11. Jeff KingSep 10, 2012
  12. Junio C HamanoSep 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.