mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 21:44:23 +01:00
single commit and bumping go-git version
This commit is contained in:
1 parent
3b45fb91e3
commit
15dedda59a
48 files changed
+1453
-390
No files matched your search
+11
@@ -87,6 +87,17 @@ func (t *Tree) File(path string) (*File, error) {
|
||||
return NewFile(path, e.Mode, blob), nil
|
||||
}
|
||||
|
||||
// Size returns the plaintext size of an object, without reading it
|
||||
// into memory.
|
||||
func (t *Tree) Size(path string) (int64, error) {
|
||||
e, err := t.FindEntry(path)
|
||||
if err != nil {
|
||||
return 0, ErrEntryNotFound
|
||||
}
|
||||
|
||||
return t.s.EncodedObjectSize(e.Hash)
|
||||
}
|
||||
|
||||
// Tree returns the tree identified by the `path` argument.
|
||||
// The path is interpreted as relative to the tree receiver.
|
||||
func (t *Tree) Tree(path string) (*Tree, error) {
|
||||
|
||||
Reference in new issue
Block a user