shithub: git9

Download patch

ref: 8745d3a9ba0a17548602be7d0d3a3e7a1ac30a7d
parent: 1a5dbff69ba31de0690069b324001605432ce5bc
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jan 28 16:00:00 EST 2020

handle subdirectories correctly in revert

--- a/revert
+++ b/revert
@@ -28,5 +28,7 @@
 if(~ $#rel 0)
 	rel=''
 
-for(f in `$nl{cd $commit/tree/ && walk -f ./$rel/$*})
+for(f in `$nl{cd $commit/tree/ && walk -f ./$rel/$*}){
+	mkdir -p `{basename -d $f}
 	cp -- $commit/tree/$f $f
+}