From a2a7293ef6e59543373fd8011016ace41fd2b8a9 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 28 Sep 2013 21:15:56 -0300 Subject: [PATCH] bin/authors: only include files that still exist --- bin/authors | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/authors b/bin/authors index 423645c..a8b43fa 100755 --- a/bin/authors +++ b/bin/authors @@ -13,6 +13,13 @@ $WIDTH = 79; +open(LOG, "git ls-files |") || die "popen ls-files"; +while () { + chop; + $e{$_} = 1; +} +close LOG; + open(LOG, "git log --format='%an <%ae>' --name-only --no-merges |") || die "popen log"; while () { @@ -22,13 +29,13 @@ while () { undef $last; next; } - if (defined $last) { + if (defined $e{$last}) { push @{ $f{$last} }, $a; $a{$a} = 1; } $last = $_; } -if (defined $last) { +if (defined $e{$last}) { push @{ $f{$last} }, $a; $a{$a} = 1; }