summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-11 05:45:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-11 05:52:29 (GMT)
commit46203ac24dc7e6b5a8d4f1b024ed93591705d47b (patch)
tree340277eb7a4026fb6849800c139f8590356027d2 /git-cvsserver.perl
parent27dd73871f814062737c327103ee43f1eb7f30d9 (diff)
downloadgit-46203ac24dc7e6b5a8d4f1b024ed93591705d47b.zip
git-46203ac24dc7e6b5a8d4f1b024ed93591705d47b.tar.gz
git-46203ac24dc7e6b5a8d4f1b024ed93591705d47b.tar.bz2
cvsserver: use safe_pipe_capture for `constant commands` as well
This is not strictly necessary, but it is a good code hygiene. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index bd29b26..ae10442 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -356,7 +356,7 @@ sub req_Root
return 0;
}
- my @gitvars = `git config -l`;
+ my @gitvars = safe_pipe_capture(qw(git config -l));
if ($?) {
print "E problems executing git-config on the server -- this is not a git repository or the PATH is not set correctly.\n";
print "E \n";
@@ -943,7 +943,7 @@ sub req_co
# Provide list of modules, if -c was used.
if (exists $state->{opt}{c}) {
- my $showref = `git show-ref --heads`;
+ my $showref = safe_pipe_capture(qw(git show-ref --heads));
for my $line (split '\n', $showref) {
if ( $line =~ m% refs/heads/(.*)$% ) {
print "M $1\t$1\n";
@@ -1181,7 +1181,7 @@ sub req_update
# projects (heads in this case) to checkout.
#
if ($state->{module} eq '') {
- my $showref = `git show-ref --heads`;
+ my $showref = safe_pipe_capture(qw(git show-ref --heads));
print "E cvs update: Updating .\n";
for my $line (split '\n', $showref) {
if ( $line =~ m% refs/heads/(.*)$% ) {
@@ -1687,7 +1687,7 @@ sub req_ci
return;
}
- my $treehash = `git write-tree`;
+ my $treehash = safe_pipe_capture(qw(git write-tree));
chomp $treehash;
$log->debug("Treehash : $treehash, Parenthash : $parenthash");