From: Ian Jackson Date: Sat, 21 Jan 2012 01:03:41 +0000 (+0000) Subject: abolish run_git_1line ExitStatus X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke.git;a=commitdiff_plain;h=5093867e8c8e3065d0d7987cd81979f3c4f023ca abolish run_git_1line ExitStatus --- diff --git a/Topbloke.pm b/Topbloke.pm index 6e9d727..b8f21a0 100644 --- a/Topbloke.pm +++ b/Topbloke.pm @@ -18,19 +18,9 @@ BEGIN { sub run_git_1line { - my $xopts; - $xopts = ref $_[0] ? shift @_ : { }; open GIT, "-|", 'git', @_ or die $!; my $l = ; $?=0; - if ($xopts->{ExitStatus}) { - if (!close GIT) { - return ($?, undef); - } else { - chomp $l or die "@_ ?"; - return (0, $l); - } - } close GIT or die "git @_ failed ($?)\n"; chomp $l or die "@_ ?"; return $l;