aboutsummaryrefslogtreecommitdiffstats
path: root/tools/generate_authors.pl
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-03-27 23:31:36 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-03-28 22:13:59 +0000
commite6c54017a7fbf4009454577a445530a7649f2c4f (patch)
treebff7bb32beecb8b9038feedeff1e500e8ce864be /tools/generate_authors.pl
parent30900b443b85a7e760d703ca3d6efe61df4fe623 (diff)
Fix out-of-tree "gen-authors" target
Change directory to the source tree before invoking `git shortlog`, otherwise it fails on build directories outside the source tree. Alexis suggested to move the git invocation to the perl script, this is done now and also avoids writing AUTHORS.git in the source tree. Change-Id: I5905ebf40d8d32a586c88671b52f28c542ca33ba Reviewed-on: https://code.wireshark.org/review/14660 Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tools/generate_authors.pl')
-rwxr-xr-xtools/generate_authors.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/generate_authors.pl b/tools/generate_authors.pl
index 187abf670f..21c05cbf02 100755
--- a/tools/generate_authors.pl
+++ b/tools/generate_authors.pl
@@ -4,7 +4,7 @@
# Generate the AUTHORS file combining existing AUTHORS file with
# git commit log.
#
-# Usage: generate_authors.pl <original AUTHORS file> <output of git shortlog>
+# Usage: generate_authors.pl AUTHORS.src
#
# Copyright 2016 Michael Mann (see AUTHORS file)
@@ -189,8 +189,8 @@ close $author_fh;
print $git_log_text;
-# XXX open "git shortlog ... |" instead?
-open( my $git_author_fh, '<', $ARGV[1] ) or die "Can't open $ARGV[1]: $!";
+open( my $git_author_fh, 'git --no-pager shortlog -se HEAD|')
+ or die "Can't execute git shortlog: $!";
while ( my $git_line = decode('UTF-8', <$git_author_fh>) ) {
chomp $git_line;