Loop to fill files.

This commit is contained in:
Bradley M. Kuhn 2016-04-28 19:47:54 -07:00
parent 1174f0c910
commit c215f6c218

View file

@ -150,11 +150,15 @@ sub ProcessCommit($$;$) {
sub RunCentralCommitMode($) { sub RunCentralCommitMode($) {
my($centralCommitId) = @_; my($centralCommitId) = @_;
print "Creating Repository object with args $GIT_REPOSITORY_PATH\n" if ($VERBOSE >= 6);
my $gitRepository = Git::Repository->new(git_dir => $GIT_REPOSITORY_PATH); my $gitRepository = Git::Repository->new(git_dir => $GIT_REPOSITORY_PATH);
my %files;
foreach my $commitId (keys %WHITELIST_COMMIT_IDS) { foreach my $commitId (keys %WHITELIST_COMMIT_IDS) {
my(@commitFiles) = $gitRepository->run('show', '--pretty="format:"', '--name-only'); my(@commitFiles) = $gitRepository->run('show', '--pretty=format:', '--name-only', $commitId);
print join("\n", @commitFiles); foreach my $file (@commitFiles) {
$files{$file} = $commitId if not defined $files{$file};
}
} }
} }