ref: ab0ba3debaf8cde4eea17107609b587e5e661fa7
parent: 4bf69ddc03340b250fa581b0f24b4f0649dd29b0
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Oct 24 23:50:25 EDT 2019
Handle spaces in filenames for revert.
--- a/revert
+++ b/revert
@@ -1,6 +1,8 @@
#!/bin/rc
commit=/mnt/git/HEAD
+nl='
+'
pfx=`{pwd}
while(~ $1 -* && ! ~ $1 --){
switch($1){
@@ -23,6 +25,6 @@
pfx=''
git/fs
-for(f in `{cd $commit/tree/ && walk -f ./$pfx/$*})
+for(f in `$nl{cd $commit/tree/ && walk -f ./$pfx/$*})
cp -- $commit/tree/$pfx/$f ./$pfx/$f