Skip to content

Commit b77b62c

Browse files
authored
tree_blob: return blob contents for blob and exec (#56) (#57)
This PR adds an `or` conditional to return blob content if a file is an executable (entry mode 0100755). Prior to this `Blob` func only returned file contents if a file was of type blob (entry mode 010644). This in a resulted error to be returned for certain files that were for instance bash scripts which had the executable mode bit set.
1 parent 40097be commit b77b62c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree_blob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (t *Tree) Blob(subpath string, opts ...LsTreeOptions) (*Blob, error) {
5353
return nil, err
5454
}
5555

56-
if e.IsBlob() {
56+
if e.IsBlob() || e.IsExec() {
5757
return e.Blob(), nil
5858
}
5959

0 commit comments

Comments
 (0)