diff options
author | thowz <thowz@web> | 2016-05-04 00:52:38 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2016-05-04 00:52:38 +0000 |
commit | 77ae0a2d680a0058c836fcf28ab2359a1d28e0c1 (patch) | |
tree | 697f473f6dfb879e96a8616e3b93822f5a3cabcd /doc | |
parent | 9e1350072b4be8b92bee329badc952ce217597e6 (diff) |
Added a comment: reinject files
Diffstat (limited to 'doc')
-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 {} \; +"""]] |