chiark
/
gitweb
/
~ian
/
topbloke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e27959
)
abolish run_git_1line ExitStatus
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 21 Jan 2012 01:03:41 +0000
(
01:03
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 21 Jan 2012 01:03:41 +0000
(
01:03
+0000)
Topbloke.pm
patch
|
blob
|
history
diff --git
a/Topbloke.pm
b/Topbloke.pm
index 6e9d7272b0d8259014511771bed50889576831e6..b8f21a026d776e574c2bec2fb899c7b4524d6f48 100644
(file)
--- 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 = <GIT>;
$?=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;