ref: 57d8a0bd95309bcc221850b263acdccc4e81b6ea
parent: caf5192dd342460e8685a113c48ee5fa06587292
author: kvik <kvik@a-b.xyz>
date: Wed Apr 8 11:53:30 EDT 2020
Use $gitrel
--- a/revert
+++ b/revert
@@ -7,7 +7,6 @@
-c revert to commit "query" (default: HEAD)
'
-rel=`{pwd}
gitup
commit=/mnt/git/HEAD
@@ -24,11 +23,7 @@
if(~ $#* 0)
usage
-rel=`{echo $rel | sed 's@^'$gitroot'/?@@'}
-if(~ $#rel 0)
- rel=''
-
-for(f in `$nl{cd $commit/tree/ && walk -f ./$rel/$*}){
+for(f in `$nl{cd $commit/tree/ && walk -f ./$gitrel/$*}){
mkdir -p `{basename -d $f}
cp -- $commit/tree/$f $f
}