diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-04 13:06:30 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-04 13:06:30 -0400 |
commit | 9c4227ad51fd04ef70e224a328e7d36403d53458 (patch) | |
tree | 9b369e36276282841d20fb29f2c47929195c90b4 /doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment | |
parent | badcc71e144235cd2aa87bc0a63354d23985d562 (diff) | |
parent | 6ceb188b9e9d509ebe9339adb99a5a1fb2590010 (diff) |
Merge branch 'master' of ssh://git-annex.branchable.com
Diffstat (limited to 'doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment')
-rw-r--r-- | doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment b/doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment new file mode 100644 index 000000000..0dfa65507 --- /dev/null +++ b/doc/bugs/OSX_case_insensitive_filesystem/comment_8_3384bca070d84220efe166a398eed8a4._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="thowz" + subject="reinject files" + date="2016-05-04T00:52:38Z" + content=""" +Here's a way to put files into their proper case-sensitive folders using `git-annex reinject --known`: + + # Enable write permissions on directories containing misfiled items + chmod u+w `find -xtype l -printf \"%l\n\" | sed -r \"s/.*(\.git\/annex\/objects\/)[^\/]*\/[^\/]*\/([^\/]*).*/\1*\/*\/\2/\" | sort | uniq` + + # Reinject those files into the annex + git-annex reinject --known `find -xtype l -printf \"%l\n\" | sed -r \"s/.*(\.git\/annex\/objects\/)[^\/]*\/[^\/]*\/([^\/]*.*)/\1*\/*\/\2/\" | sort | uniq` + + # Remove empty directories (rmdir will fail on the non-empty directories) + find .git/annex/objects -mindepth 3 -maxdepth 3 -type d -exec rmdir {} \; + find .git/annex/objects -mindepth 2 -maxdepth 2 -type d -exec rmdir {} \; +"""]] |