diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-05-30 17:46:21 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-05-30 17:46:21 -0700 |
commit | 12e952e684d149628360b6fcdb583be86052f944 (patch) | |
tree | b7ede146e2d145c9dcdc92a80e1a92d2be869aad /sys/lib | |
parent | 1af2546e96fa96ec5341026dd509c9e4ed54c6db (diff) |
git/fs: move mount point to $repo/.git/fs
Moving the mount point to within the repo
directory means that we can have multiple
git repos mounted at once with no conflict.
Diffstat (limited to 'sys/lib')
-rw-r--r-- | sys/lib/git/common.rc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/lib/git/common.rc b/sys/lib/git/common.rc index 573612712..dbcef04bf 100644 --- a/sys/lib/git/common.rc +++ b/sys/lib/git/common.rc @@ -75,14 +75,17 @@ fn gitup{ gitroot=`{git/conf -r >[2]/dev/null} if(~ $#gitroot 0) die 'not a git repository' + gitfs=$gitroot/.git/fs gitrel=`{pwd | subst '^'$"gitroot'/?'} if(~ $#gitrel 0) gitrel='.' cd $gitroot startfs=() - if(! test -e /mnt/git/ctl) + if(! test -d $gitfs) + mkdir -p $gitfs + if(! test -e $gitfs/ctl) startfs=true - if(! grep -s '^repo '$gitroot'$' /mnt/git/ctl >[2]/dev/null) + if(! grep -s '^repo '$gitroot'$' $gitfs/ctl >[2]/dev/null) startfs=true if(~ $#startfs 1) git/fs |