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

Case sensitivity on Windows for absolute paths.

From
RCRicky Clarkson <ricky.clarkson@gmail.com>
Date
Apr 23, 2010, 14:12 UTC
Message-ID
<o2v7eeb06461004230712i2c8c1e61l4c50a73a4f6c83d@mail.gmail.com>
Hi,

I noticed that if I have a git repository at C:\foo, and there is a file in there named bar, git add bar works fine, git add C:\foo/bar works fine but git add c:\foo/bar does not. git reports that the file 'is outside repository'. Looking at setup.c it seems that string comparisons are being used to determine whether a file is within the repository.

For my purposes I can probably make a Windows build that does it while ignoring the case, but is there a more proper way that git should do it? I'm not familiar enough with the POSIX file routines to know.

A separate tool, maven, is what specifies it as lowercase, otherwise I would obviously just write C: instead of c: myself. I think I know how to fix that so it uses relative paths, and will look into that, but it would be good to have git do the right thing too.

Thanks, Ricky.

--
Ricky Clarkson
Java and Scala Programmer, AD Holdings
+44 1928 706373
Skype: ricky_clarkson
Google Talk: ricky.clarkson@gmail.com
Google Wave: ricky.clarkson@googlewave.com
Next: Johannes Sixt
Message 1 of 5 in “Case sensitivity on Windows for absolute paths.”
  1. Ricky ClarksonApr 23, 2010
  2. Johannes SixtApr 23, 2010
  3. Ricky ClarksonApr 25, 2010
  4. Johannes SixtApr 25, 2010
  5. Ricky ClarksonApr 25, 2010

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.