Filter out duplicates in filenames_in_patch so that callers don't
have to deal with them.
---
 quilt/scripts/patchfns.in |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -662,7 +662,8 @@ filenames_in_patch()
                                next
                          for (n=0 ; n<'$strip'; n++)
                              sub(/^[^\/]+\//, "")
-                         print $0 }' $patch_file
+                         if (!printed[$0]++)
+                             print $0 }' $patch_file
        fi
 }
 
@@ -677,7 +678,7 @@ files_in_patch_ordered()
        $1 == "-" { out=1 ; next }
        !out    { files[$0]=1
                  new_files[++n]=$0 }
-       out     { if ($0 in files && !($0 in printed)) {
+       out     { if ($0 in files) {
                    print $0
                    printed[$0]=1
                  }

-- 
Jean Delvare
SUSE L3 Support


_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to