chiark / gitweb /
git-debrebase: fix cfg in scalar context (!)
[dgit.git] / git-debrebase
index 932a3b7a6aed3b67fe40d9846aa5366da1432d78..403fba1ba6bc458099849df521b7d6ebff88e660 100755 (executable)
@@ -111,7 +111,8 @@ sub cfg ($;$) {
        fail "missing required git config $k" unless $optional;
        return ();
     }
        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');
 }
 
 memoize('cfg');