aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/treefs.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-13 03:32:21 +0000
committerGravatar Runxi Yu2026-06-13 04:59:51 +0000
commitbe63ecd9711b46135bbff1769c2e4c3642255ef1 (patch)
treed5581c8b2e438af2b8ae82dd8f200393b2dbc5d3 /object/fetch/treefs.go
parentTODO: Update (diff)
Unify lengths
Diffstat (limited to 'object/fetch/treefs.go')
-rw-r--r--object/fetch/treefs.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/object/fetch/treefs.go b/object/fetch/treefs.go
index da92af51..9d88abb2 100644
--- a/object/fetch/treefs.go
+++ b/object/fetch/treefs.go
@@ -11,7 +11,6 @@ import (
oid "lindenii.org/go/furgit/object/id"
"lindenii.org/go/furgit/object/tree"
"lindenii.org/go/furgit/object/tree/mode"
- "lindenii.org/go/lgo/intconv"
)
// TreeFS exposes one Git tree as an fs.FS view backed by a Fetcher.
@@ -69,7 +68,7 @@ func (entry treeEntryValue) isDir() bool {
return entry.mode == mode.Directory
}
-func (entry treeEntryValue) blobSize(fetcher *Fetcher) (uint64, error) {
+func (entry treeEntryValue) blobSize(fetcher *Fetcher) (int, error) {
return fetcher.Size(entry.objectID)
}
@@ -434,10 +433,7 @@ func (treeFS *TreeFS) statEntry(entry treeEntryValue) (*treeFSInfo, error) {
return nil, err
}
- size, err = intconv.Uint64ToInt64(sz)
- if err != nil {
- return nil, fmt.Errorf("object/fetch: blob size overflows int64: %w", err)
- }
+ size = int64(sz)
}
var sys any