X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FApp%2FCodeowners.pm;h=3ab012d137fa72cc7fcaa60851a9eb3661d282c3;hb=bbf4da1268e0c9c58f9ed28fadc499fc40a0f03e;hp=1dc97cc49dba3ead168ab5e4bd23e2865c0d0424;hpb=3c7ed3d762399efb2d01121392f7115104095788;p=chaz%2Fgit-codeowners diff --git a/lib/App/Codeowners.pm b/lib/App/Codeowners.pm index 1dc97cc..3ab012d 100644 --- a/lib/App/Codeowners.pm +++ b/lib/App/Codeowners.pm @@ -184,7 +184,7 @@ sub _command_update { my $template = <<'END'; This file shows mappings between subdirs/files and the individuals and teams who own them. You can read this file yourself or use tools to query it, - so you can quickly determine who to speak with or send pull requests to. ❤️ + so you can quickly determine who to speak with or send pull requests to. Simply write a gitignore pattern followed by one or more names/emails/groups. Examples: @@ -201,11 +201,10 @@ END if ($repopath) { # if there is a repo we can try to update the list of unowned files - my $git_files = git_ls_files($repopath); - if (@$git_files) { - $codeowners->clear_unowned; - $codeowners->add_unowned(grep { !$codeowners->match($_) } @$git_files); - } + my ($proc, @filepaths) = git_ls_files($repopath); + $proc->wait and exit 1; + $codeowners->clear_unowned; + $codeowners->add_unowned(grep { !$codeowners->match($_) } @filepaths); } $codeowners->write_to_filepath($path); @@ -213,3 +212,12 @@ END } 1; +__END__ + +=head1 DESCRIPTION + +This is the implementation of the F command. + +See L for documentation. + +=cut