summaryrefslogtreecommitdiff
path: root/doc/bugs/git-annex_directory_hashing_problems_on_osx.mdwn
blob: d1a3c060776c198ed5326d1b573c3f9807363ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Currently the hashed directories in .git-annex allow for upper and lower case directory names... on linux (or any case sensitive filesystem) the directory names such as 'Gg' and 'GG' are different and unique. However on systems like OSX (and probably windows if it is ever supported) the directory names 'Gg' is the same as 'GG'

In one of the annex'd repos that I have this has occured...

<pre>
$ git add -i                                                                                          
           staged     unstaged path
  1:    unchanged        +1/-1 .git-annex/GM/GV/WORM-s183630166-m1301072171--somefile.log
  2:    unchanged        +1/-1 .git-annex/Gm/GV/WORM-s183630166-m1301072171--somefile.log
</pre>


this has somewhat confused git when it tries to stage/merge files, I didn't notice this at first, but it is definately a problem for someone using case insensitive filesystems  like the default OSX HFS+ formats or vfat/fat32.

> I feel a bit stupid to not have considered case-insensative filesystems.
> They are just so far from where I have lived for 20 years that it's hard
> to keep them in mind.
> 
> I guess that
> [[git-annex_has_issues_with_git_when_staging__47__commiting_logs]] is
> somehow a consequence (or cause?) of this, but I don't quite understand
> how this is causing git to fail to stage files, or stage the same file
> twice under different capitalizations. git-annex always will run git add
> on the path with the "correct" capitalization. So unless something else
> has added the path with the other capitalization (perhaps git add
> .git-annex manually?) I don't understand how you get to this state.
> --[[Joey]]

Also I came across this when I accidentally annexed some files in the .git-annex directory and it cause git-annex/git to be very unhappy when i pulled the repo to somewhere else. It might be worth teaching git-annex to disallow annex'ing of files inside the .git-annex/.git directories.

> There is a guard against `git annex add .git-annex/foo`, but it doesn't
> notice `cd .git-annex; git annex add foo`. --[[Joey]]