quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH] Passing options to diffstat


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] Passing options to diffstat
Date: Thu, 15 Sep 2005 22:49:30 +0200

Hi all,

I have the following patch applied locally, which lets quilt pass
arbitrary options to diffstat when refreshing patches. I'm not sure how
much public interest there is for this feature, but OTOH the patch is so
small and unintrusive that applying certainly can't hurt. Objections
anyone?

Thanks,

Index: quilt.quiltrc
===================================================================
RCS file: /cvsroot/quilt/quilt/quilt.quiltrc,v
retrieving revision 1.6
diff -u -r1.6 quilt.quiltrc
--- quilt.quiltrc       6 Sep 2005 18:19:54 -0000       1.6
+++ quilt.quiltrc       15 Sep 2005 19:29:09 -0000
@@ -4,6 +4,8 @@
 QUILT_DIFF_OPTS="--show-c-function"
 # Options passed to GNU patch when applying patches
 #QUILT_PATCH_OPTS="--ignore-whitespace"
+# Options passed to diffstat when generating patch statistics
+#QUILT_DIFFSTAT_OPTS="-r2"
 
 # Options to pass to commands (QUILT_${COMMAND}_ARGS)
 QUILT_PUSH_ARGS="--color=auto"
Index: doc/quilt.1.in
===================================================================
RCS file: /cvsroot/quilt/quilt/doc/quilt.1.in,v
retrieving revision 1.11
diff -u -r1.11 quilt.1.in
--- doc/quilt.1.in      6 Sep 2005 18:19:54 -0000       1.11
+++ doc/quilt.1.in      15 Sep 2005 19:29:09 -0000
@@ -144,6 +144,13 @@
 "--unified-reject-files" option for generating reject files in unified
 diff style.
     
+.IP QUILT_DIFFSTAT_OPTS 4
+
+Additional options that quilt shall pass to diffstat when generating
+patch statistics. For example, "-f0" can be used for an alternative output
+format. Recent versions of diffstat also support alternative rounding
+methods ("-r1", "-r2").
+
 .IP QUILT_PATCHES 4
 
 The location of patch files, defaulting to "patches".
Index: quilt/refresh.in
===================================================================
RCS file: /cvsroot/quilt/quilt/quilt/refresh.in,v
retrieving revision 1.48
diff -u -r1.48 refresh.in
--- quilt/refresh.in    2 Sep 2005 17:02:12 -0000       1.48
+++ quilt/refresh.in    15 Sep 2005 19:29:09 -0000
@@ -256,7 +256,7 @@
 
 if [ -n "$opt_diffstat" ]
 then
-       diffstat="$(@DIFFSTAT@ -p$opt_strip_level $tmp_patch)" || die 1
+       diffstat="$(@DIFFSTAT@ $QUILT_DIFFSTAT_OPTS -p$opt_strip_level 
$tmp_patch)" || die 1
        @AWK@ '
            function print_diffstat(arr, i) {
              split(diffstat, arr, "\n")


-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]