git/add: clear qid cache as side effect

this is an occasionally useful side effect when
doing surgery on repos, so let's have it.
This commit is contained in:
Ori Bernstein 2021-06-12 14:57:58 +00:00
parent aacf368c6d
commit 73db7a20f7

4
sys/src/cmd/git/add Normal file → Executable file
View file

@ -31,9 +31,7 @@ for(f in $files){
# We don't want a matching qid, so that
# git/walk doesn't think this came from
# a checkout.
if(! test -e $addpath)
if(~ $add 'tracked' || test -e $gitfs/HEAD/tree/$f)
touch $addpath
echo -n > $addpath
rm -f $delpath
}
}