2021-05-17 01:49:45 +00:00
|
|
|
#!/bin/rc
|
2021-06-08 20:20:06 +00:00
|
|
|
rfork en
|
2021-05-17 01:49:45 +00:00
|
|
|
. /sys/lib/git/common.rc
|
|
|
|
|
|
|
|
gitup
|
|
|
|
|
|
|
|
flagfmt='c:query query' args='file ...'
|
|
|
|
eval `''{aux/getflags $*} || exec aux/usage
|
|
|
|
|
2021-05-31 00:46:21 +00:00
|
|
|
commit=$gitfs/HEAD
|
2021-05-17 01:49:45 +00:00
|
|
|
if(~ $#query 1)
|
|
|
|
commit=`{git/query -p $query}
|
|
|
|
|
|
|
|
for(f in `$nl{cd $commit/tree/ && walk -f ./$gitrel/$*}){
|
|
|
|
mkdir -p `{basename -d $f}
|
|
|
|
cp -- $commit/tree/$f $f
|
|
|
|
git/add $f
|
|
|
|
}
|
|
|
|
exit ''
|