Skip to content

Instantly share code, notes, and snippets.

@apevec
Created November 14, 2013 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apevec/7471619 to your computer and use it in GitHub Desktop.
Save apevec/7471619 to your computer and use it in GitHub Desktop.
Pre-create git object folders so sharing can work on NFS shares with nosetuid option. Don't forget to set core.sharedrepository=1 in $1/config
#!/bin/bash
set -e
cd $1/objects
for i in $(seq 0 255); do
hex=$(printf "%02x " $i)
mkdir -p $hex
chgrp devel $hex
chmod 770 $hex
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment