[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 1/2] filenames_in_patch: Print each file only once
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 1/2] filenames_in_patch: Print each file only once |
Date: |
Wed, 16 Jul 2014 17:25:50 +0200 |
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] [PATCH 1/2] filenames_in_patch: Print each file only once,
Jean Delvare <=