threads / patch / 771

patchcg-mkpatch: use git-apply --stat

Subject: [PATCH] cg-mkpatch: use git-apply --stat

## tl;dr

One message between May 30, 2005 and May 30, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jonas Fonseca· May 30, 2005, 20:34 UTC · lore
Change cg-mkpatch to use git-apply --stat instead of optional diffstat.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 cg-mkpatch |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
Show changes to cg-mkpatch +2 −10
diff --git a/cg-mkpatch b/cg-mkpatch
--- a/cg-mkpatch
+++ b/cg-mkpatch
@@ -42,7 +42,6 @@ USAGE="cg-mkpatch [-s] [-r REVISION[:REV
 . ${COGITO_LIB}cg-Xlib
 
 omit_header=
-has_diffstat=
 log_start=
 log_end=
 mergebase=
@@ -71,11 +70,8 @@ showpatch () {
 
 				echo commit $id
 				cat $header
-
-				if [ "$has_diffstat" ]; then
-					echo
-					cat $patch | diffstat -p1
-				fi
+				echo
+				cat $patch | git-apply --stat
 			fi
 			;;
 		*)
@@ -116,10 +112,6 @@ while [ "$1" ]; do
 	shift
 done
 
-if ! [ "$omit_header" ]; then
-	which diffstat >/dev/null 2>&1 && has_diffstat=1
-fi
-
 if [ "$mergebase" ]; then
 	[ "$log_start" ] || log_start="origin"
 	[ "$log_end" ] || log_end="master"
-- 
Jonas Fonseca

← back to recent threads