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

Re: [Bug Report] [includeIf] does not parse case insensitive -> case sensitive symlink gitdir

From
Torsten Bögershausen <tboegi@web.de>
Date
Oct 27, 2017, 15:33 UTC
Message-ID
<20171027153336.GA26626@tor.lan>
In-Reply-To
<CAEm1wifEZ5CXH7N_cCJpXQN-1dWBRZ1OQ=bJH-X=kR15Bg0Sdw@mail.gmail.com>
On Fri, Oct 27, 2017 at 09:55:58AM -0400, Adrian Kappel wrote:
> Hello all, not sure if the issue I've come across is a known bug or
> addressable, but wanted to report it just in-case.
Thanks for the detailed description - my question is inline
Show 34 quoted lines
> 
> 
> ** Summary
> ------------------------------------------------------------------
> Using the [includeIf] configuration statement with a symlink'd gitdir
> will not work if the symlink is on a case insensitive volume and the
> location it references is on a case sensitive volume.
> 
> ** Steps to reproduce
> ------------------------------------------------------------------
> 1. Create symlink (case insensitive -> case sensitive):
> /Users/usera/dev -> /Volumes/CaseSensitive/dev
> 2. Create two files: .gitignore and .gitignore-work, both stored in
> /Users/usera/
> 
> .gitconfig
> -------------
> [user]
>   name = First Last
> 
>   [includeIf "gitdir:~/dev/work"]
>     path = .gitconfig-work
> 
> .gitconfig-work
> --------------------
> [user]
>   email = email@address.com
> 
> 3. cd into a subfolder of ~/dev/work that has been git initialized.
> Let's say ~/dev/work/repo
> 4. Run git config --includes user.email
> 5. See that nothing is output from the command
> 6. Update the [includeIf] statement in .gitconfig to be the real
> location i.e. "gitdir:/Volumes/CaseSensitive/dev/work/repo"

Didn't you set it up pointing do the real location ? That is what is written above:

> 1. Create symlink (case insensitive -> case sensitive):
> /Users/usera/dev -> /Volumes/CaseSensitive/dev
(I suspect that people use something like this:
 /Users/usera/dev -> /Volumes/casesensitive/dev
 And in this case it would be the file system which says
 casesensitive != CaseSensitive and Git can't do much about it)
Show 21 quoted lines
> 7. Rerun the command from [4]
> 8. See that email@address.com is output from the command
> 
> ** Other variations that were not tested
> ------------------------------------------------------------------
> - symlink on case sensitive volume referencing a location on a case
> insensitive volume
> 
> ** Environment Information
> ------------------------------------------------------------------
> git --version: 2.14.1
> OS: macOS Sierra 10.12.6
> 
> 
> If a fix is not feasible or likely to be implemented, I would
> recommend that we update the git site's documentation to reflect this
> gotcha. After verification of course.
> 
> Best,
> Adrian Kappel
> akappel <https://github.com/akappel/>
Previous: Adrian Kappel
Message 2 of 2 in “[Bug Report] [includeIf] does not parse case insensitive -> case sensitive symlink gitdir”
  1. Adrian KappelOct 27, 2017
  2. Torsten BögershausenOct 27, 2017

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.