ref: 5b4249105002f51a84e02d29f1678ad52cf2e96b
parent: c44adda7a7ce4f2ee4babf384dc9d321d21e34ad
author: kvik <kvik@a-b.xyz>
date: Thu Apr 9 15:57:27 EDT 2020
Use mntgen(1) for branch scratch space
--- a/export
+++ b/export
@@ -12,12 +12,9 @@
if(~ $#q 0)
q=HEAD
commits=`{git/query $q || die $status}
-
-scratch=/tmp/gitexport.$pid
-mkdir -p $scratch
-mkdir $scratch/a $scratch/b
n=1
m=$#commits
+mntgen /mnt/scratch
for(c in $commits){
cp=`{git/query -p $c}
pp=`{git/query -p $c'^'}
@@ -24,7 +21,7 @@
@{
rfork n
- cd $scratch
+ cd /mnt/scratch
bind $pp/tree a
bind $cp/tree b
@@ -53,5 +50,3 @@
echo
n=`{echo $n + 1 | bc}
}
-rm $scratch/a $scratch/b
-rm $scratch