From 12e952e684d149628360b6fcdb583be86052f944 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sun, 30 May 2021 17:46:21 -0700 Subject: 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. --- sys/lib/git/common.rc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/lib') 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 -- cgit v1.2.3