chiark / gitweb /
git-debrebase: fix cfg in scalar context (!)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Feb 2018 00:06:14 +0000 (00:06 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:06:58 +0000 (16:06 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 932a3b7..403fba1 100755 (executable)
@@ -111,7 +111,8 @@ sub cfg ($;$) {
        fail "missing required git config $k" unless $optional;
        return ();
     }
-    return split /\0/, $out;
+    my @l = split /\0/, $out;
+    return wantarray ? @l : $l[0];
 }
 
 memoize('cfg');