git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cg-mkpatch: use git-apply --stat
@ 2005-05-30 20:34 Jonas Fonseca
  0 siblings, 0 replies; only message in thread
From: Jonas Fonseca @ 2005-05-30 20:34 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

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(-)

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-30 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-30 20:34 [PATCH] cg-mkpatch: use git-apply --stat Jonas Fonseca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).