summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/patchfns.in16
1 files changed, 5 insertions, 11 deletions
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index e75e365..98f5c51 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -492,28 +492,22 @@ files_in_patch_ordered()
{
local patch=$1
- ( files_in_patch $patch
+ ( files_in_patch $patch | sort
echo "-"
filenames_in_patch $patch
) | @AWK@ '
$1 == "-" { out=1 ; next }
- !out { files[$0]=1 }
+ !out { files[$0]=1
+ new_files[++n]=$0 }
out { if ($0 in files && !($0 in printed)) {
print $0
printed[$0]=1
}
}
END {
- i = 1
- for (file in files) {
- if (!(file in printed)) {
- new_files[i]=file
- i++
- }
- }
- n = asort(new_files)
for (i=1; i<=n; i++)
- print new_files[i]
+ if (!(new_files[i] in printed))
+ print new_files[i]
}
'
}