diff options
| author | 2026-02-21 04:17:32 +0800 | |
|---|---|---|
| committer | 2026-02-21 04:17:32 +0800 | |
| commit | a96abc307995afc09f637c905807c0c5203ab874 (patch) | |
| tree | 2e78f0068eba90b33220e4c871ba27ef1e1d9c52 /objectstore/loose/paths.go | |
| parent | objectstore/loose: Add testing (diff) | |
objectstore/loose: We should receive the objects directory, not repo root
Diffstat (limited to 'objectstore/loose/paths.go')
| -rw-r--r-- | objectstore/loose/paths.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/objectstore/loose/paths.go b/objectstore/loose/paths.go index 0e4b7d05..7c8bae92 100644 --- a/objectstore/loose/paths.go +++ b/objectstore/loose/paths.go @@ -11,13 +11,13 @@ import ( "codeberg.org/lindenii/furgit/objectstore" ) -// objectPath returns the loose object path for id. +// objectPath returns the loose object path for id relative to the objects root. func (store *Store) objectPath(id objectid.ObjectID) (string, error) { if id.Algorithm() != store.algo { return "", fmt.Errorf("objectstore/loose: object id algorithm mismatch: got %s want %s", id.Algorithm(), store.algo) } hex := id.String() - return path.Join("objects", hex[:2], hex[2:]), nil + return path.Join(hex[:2], hex[2:]), nil } // openObject opens the loose object file for id. |
