git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonas Fonseca <fonseca@diku.dk>
Date
May 30, 2005, 20:34 UTC
Message-ID
<20050530203437.GA13961@diku.dk>
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
Message 1 of 1 in “cg-mkpatch: use git-apply --stat”
  1. cg-mkpatch: use git-apply --statJonas Fonseca, May 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.