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

Re: [PATCH] Demonstrate failure of 'core.ignorecase = true'

From
Jeff King <peff@peff.net>
Date
Mar 23, 2012, 18:48 UTC
Message-ID
<20120323184823.GA14711@sigill.intra.peff.net>
In-Reply-To
<7v62dvus3f.fsf@alter.siamese.dyndns.org>
On Fri, Mar 23, 2012 at 10:47:48AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Thomas Rast <trast@student.ethz.ch> writes:
> 
> > How about trying to read "HEAD" as "head" instead when core.ignorecase
> > is true?  That would allow us to catch such misconfiguration (which I
> > imagine can also happen accidentally if you mv a repository across FS
> > boundaries) and tell the user about it.
> 
> Do you mean something like this?
> 
> I do not like it.  It essentially amounts to checking with the FS every
> time we run Git.

I think Thomas's suggestion is to piggy-back it onto an existing file lookup ("head" instead of "HEAD"), so you aren't doing any extra work. However, I'm not sure that would be sufficient. If I copy a repo from a case-insensitive filesystem to a case-sensitive one, what will the case of "HEAD" be on the new filesystem?

If the original filesystem was case-preserving, I would expect "HEAD". But on a true caseless filesystem, it could be either. Of course, current git would already blow up if the file was copied as "head", which makes me think this is probably a rare case. So maybe that is not worth worrying about.

I dunno. I think Thomas's idea is clever, but is this actually a problem in practice? The current discussion seems more like a documentation bug, and I don't remember seeing anybody reporting issues moving a repo across filesystems (presumably most people use clone or push, which handle this properly).

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 7 of 23 in “Demonstrate failure of 'core.ignorecase = true'”
  1. Demonstrate failure of 'core.ignorecase = true'Peter J. Weisberg, Mar 21, 2012
  2. Junio C HamanoMar 21, 2012
  3. PJ WeisbergMar 22, 2012
  4. Junio C HamanoMar 22, 2012
  5. Thomas RastMar 23, 2012
  6. Junio C HamanoMar 23, 2012
  7. Jeff KingMar 23, 2012
  8. Jeff KingMar 23, 2012
  9. Johannes SixtMar 22, 2012
  10. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  11. Jeff KingMar 22, 2012
  12. Junio C HamanoMar 22, 2012
  13. Jeff KingMar 22, 2012
  14. Junio C HamanoMar 22, 2012
  15. Jeff KingMar 22, 2012
  16. Junio C HamanoMar 22, 2012
  17. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  18. Junio C HamanoMar 22, 2012
  19. Zbigniew Jędrzejewski-SzmekMar 22, 2012
  20. PJ WeisbergMar 22, 2012
  21. Junio C HamanoMar 22, 2012
  22. Jeff KingMar 22, 2012
  23. Junio C HamanoMar 22, 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.