sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit f939d14e0c16243d887bdc864d562785550d1259
parent 5142975a73ccf3a764596e0ef9ff32c4b06fd2da
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Tue, 19 Apr 2016 01:48:16 +0200

Check that .git/config file exists before attempting to open it

Diffstat:
MSBO-Lib/lib/SBO/Lib.pm | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm @@ -342,6 +342,7 @@ sub git_sbo_tree { sub check_git_remote { script_error('check_git_remote requires two arguments.') unless @_ == 2; my ($path, $url) = @_; + return 0 unless -f "$path/.git/config"; my ($fh, $exit) = open_read("$path/.git/config"); return 0 if $exit;