Code

builtin-fetch.c (store_updated_refs): Honor update_local_ref() return value
[git.git] / perl / Git.pm
index 6ba8ee5c0d209704fdf1c9d58f63579d3a7e0836..d05b633b64ac6440f8c86405beb13df281bde989 100644 (file)
@@ -811,12 +811,12 @@ sub cat_blob {
        my $description = <$in>;
        if ($description =~ / missing$/) {
                carp "$sha1 doesn't exist in the repository";
-               return 0;
+               return -1;
        }
 
        if ($description !~ /^[0-9a-fA-F]{40} \S+ (\d+)$/) {
                carp "Unexpected result returned from git cat-file";
-               return 0;
+               return -1;
        }
 
        my $size = $1;