shithub: riscv

Download patch

ref: 926be5e34eb633bc3e22b013705f5474d21aa735
parent: 5d37407e3c98b41f64c20a3d03125d3ea6299a2d
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jun 4 19:35:49 EDT 2022

git/import: use patch(1)

we have a new, pretty patch(1), lets use it.

--- a/sys/src/cmd/git/import
+++ b/sys/src/cmd/git/import
@@ -78,7 +78,7 @@
 	rc -c '
 		echo applying $msg | sed 1q
 		date=`{seconds $date}
-		if(! files=`$nl{ape/patch -Ep1 < $diffpath | grep ''^patching file'' | sed ''s/^patching file `(.*)''''/\1/''})
+		if(! files=`$nl{patch -p1 < $diffpath})
 			die ''patch failed''
 		for(f in $files){
 			if(test -e $f)