quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] [PATCH] Optimize function filenames_in_patch


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] Optimize function filenames_in_patch
Date: Tue, 17 Jun 2014 22:05:18 +0200

Minor optimizations:
* Drop unneeded quotes
* Drop unneeded pattern capturing
---
 quilt/scripts/patchfns.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -656,8 +656,8 @@ filenames_in_patch()
                $3 != "----" && $3 != "****" \
                        { sub(/\t.*/, "")
                          sub(/^... /, "")
-                         for (n=0 ; n<'"$strip"'; n++)
-                             sub(/^([^\/]+\/)/, "")
+                         for (n=0 ; n<'$strip'; n++)
+                             sub(/^[^\/]+\//, "")
                          print $0 }' $patch_file
        fi
 }

-- 
Jean Delvare
SUSE L3 Support




reply via email to

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