I'm currently trying to implement this recommendation to be able preserve file permissions while doing Git clones. However, when I run the command, I receive this error.
$ git-cache-meta.sh --store
find: you have too many ')'
A previous error was in regards to having too many files being listed by Git (I have around 2.5GB worth of files which I am tracking which I understand is pushing the limits of a single Git project already).
Is there something I had done wrong of the initialization of the shell script (I used the main code listed here:
1. #!/bin/sh -e
2.
3. #git-cache-meta -- simple file meta data caching and applying.
4. #Simpler than etckeeper, metastore, setgitperms, etc.
5. #from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
6. #modified by n1k
7. # - save all files metadata not only from other users
8. # - save numeric uid and gid
9.
10. # 2012-03-05 - added filetime, andris9
11.
12. : ${GIT_CACHE_META_FILE=.git_cache_meta}
13. case $@ in
14. --store|--stdout)
15. case $1 in --store) exec > $GIT_CACHE_META_FILE; esac
16. find $(git ls-files)\
17. \( -printf 'chown %U %p\n' \) \
18. \( -printf 'chgrp %G %p\n' \) \
19. \( -printf 'touch -c -d "%AY-%Am-%Ad %AH:%AM:%AS" %p\n' \) \
20. \( -printf 'chmod %#m %p\n' \) ;;
21. --apply) sh -e $GIT_CACHE_META_FILE;;
22. *) 1>&2 echo "Usage: $0 --store|--stdout|--apply"; exit 1;;
23. esac
but I did not use any of the revisions, which seemed to be addressing separate problems). Several of the reported errors on that page seemed to be in regards to specific characters in a file name, but looking through, I can't find any '(' or ')' that might raise the error I'm getting.
If it is related to trying to track too many files however, are there any recommendations as to maintain file permissions and owner meta-data while deploying it in Git?