storekit

package
v0.2026322.2154 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 18 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package storekit owns charly's content-addressed STORE, and re-exports the ROOTS it lives under.

THE ROOTS ARE THE CONTRACT MODULE'S, and this package re-exports them rather than keeping a second computation. D-CORE-1 has core build "the store instance (built on the sdk store, §17)" — the module graph is core → sdk for the store — but core may import only permitted contract surfaces and never an sdk mechanism kit, so a root resolved ONLY here was a root the host could not reach: it hand-built `$XDG_CACHE_HOME/charly` and `$XDG_RUNTIME_DIR/charly` and therefore could not see `CHARLY_CACHE_DIR`, which is exactly the defect opencharly/charly#1119 records. `github.com/opencharly/spec/storeroot` now owns the four roots and the single override; `Dir` and `CacheDir` below delegate to it, so every plugin that imports this package gets the same four roots and the same strings as before, and the host reaches the SAME implementation through a surface it may import.

There are FOUR roots, and an artifact lives in the CACHE root like every other cached item: D-STORE-3's store holds "every cached item … including artifacts", and `CHARLY_CACHE_DIR` is the ONE override that relocates it. A fifth, durable data root was proposed and REVERTED (opencharly/spec#375, opencharly/opencharly#1098) precisely because a second layout in a second root is what D-STORE-1 and D-STORE-3 forbid.

A roots or store implementation living anywhere else is still the deviation this package exists to end: before it, the cache root was resolved inside `spec/cache` (under the CONFIG root, contrary to D-STORE-1 — opencharly/spec#233) and four other packages built their own `.cache` paths by hand.

BUILDING THIS PACKAGE BEFORE `spec`'S TAG EXISTS — the same-module trap: a `go.work` cannot list one module twice, so two worktrees of THIS module (`github.com/opencharly/sdk`) cannot be bridged by a workspace; the error is that a workspace module is listed more than once. A workspace CAN list this module's worktree together with a `spec` worktree (two DIFFERENT modules), which is the legal pre-tag route; the durable route is a branch commit of this package that a caller fetches by path. The pushed form carries a real `require` on the spec tag — never a `replace`, and never a committed `go.work`.

TWO LAYERS, NEVER CONFUSED (the operator's one-store mandate):

  • THE STORE is one OCI Image Layout per named store, under the ONE cache root. Every cached item is ONE OCI image manifest: its config blob carries the entry's validity metadata, its layers carry the payload, its annotations carry the cache key (`ai.opencharly.cache.key`) and the tag (`org.opencontainers.image.ref.name`). Blobs are content-addressed by digest, publication is atomic (tmp + rename), and reads take no lock.
  • A VIEW is a materialization a consumer actually reads — a tree a loader scans, a binary a loader execs, a disk a hypervisor opens. Views are HARD-LINKED out of the store's own blobs and live INSIDE the store tree, so they are on one filesystem by construction, they add bytes exactly once, and deleting a view never orphans a blob.

D-STORE-6, and the one place it must not be misread: PAYLOAD layers carry no timestamps and no absolute paths; the validity metadata — which necessarily contains a resolution time — lives in the CONFIG blob, and the config blob is deliberately NOT part of the payload digest. Do not "fix" this by stripping the validity record or by putting a timestamp in a payload.

Index

Constants

View Source
const (
	// ImageStoreName is the name of the ONE store a host's built images live in: the `registry`
	// named store under the cache root. It is a NAME, not a path element under a data root — see
	// the header for why this name and not `images` (retired) or a second root (D-STORE-1).
	ImageStoreName = "registry"

	// AnnotationImageName is the annotation that NAMES an image inside an OCI layout index, in an
	// ARCHIVE crossing the engine boundary. See the header for why it is not AnnotationRefName.
	AnnotationImageName = "io.containerd.image.name"
)
View Source
const (
	// RootConfig — `$XDG_CONFIG_HOME/charly`: what the USER sets.
	RootConfig = storeroot.RootConfig
	// RootCache — `$XDG_CACHE_HOME/charly`: everything content-addressed and re-derivable.
	// The single `CHARLY_CACHE_DIR` override relocates this one and therefore every store.
	RootCache = storeroot.RootCache
	// RootState — `$XDG_STATE_HOME/charly`: durable state that is NOT cache — install
	// ledgers, process locks, anything a restart must not lose and a `cache clear` must not
	// touch.
	RootState = storeroot.RootState
	// RootRuntime — `$XDG_RUNTIME_DIR/charly`: per-boot runtime state.
	RootRuntime = storeroot.RootRuntime
)
View Source
const AnnotationCacheKey = "ai.opencharly.cache.key"

AnnotationCacheKey is the annotation that carries an entry's raw cache key. It is the SAME name `spec/cache` uses, deliberately: one key vocabulary across every store, so a reader that knows one store knows them all.

View Source
const AnnotationCreated = "org.opencontainers.image.created"

AnnotationCreated dates an entry. It is the export's recency key and it is STRIPPED from a stored artifact payload (D-STORE-6: a payload carries no timestamp); an entry that wants to record its own time records it as an annotation, outside the payload's digest.

View Source
const AnnotationRefName = "org.opencontainers.image.ref.name"

AnnotationRefName is the OCI index descriptor's ref-name annotation, and it is the SAME name the image spec and `spec/cache` use. Named rather than spelled out at each use site because there are four — LookupEntry's match, indexEntry's write, indexEntry's replace test, and the sweep's delete — and a vocabulary that must agree across three packages may not be four string literals that happen to be equal today.

View Source
const LayoutFile = "oci-layout"

LayoutFile is the marker that makes a directory an OCI image layout, and therefore a store.

View Source
const MediaTypeOCIIndex = "application/vnd.oci.image.index.v1+json"

MediaTypeOCIIndex is the media type of an OCI image index — the shape `index.json` has in a store tree and in an OCI archive alike, and the media type an index the store WRITES declares.

View Source
const MediaTypeStoreEntry = "application/vnd.opencharly.store.entry.v1+json"

MediaTypeStoreEntry is the media type of a store entry manifest.

Variables

This section is empty.

Functions

func BlobBytes added in v0.2026288.2236

func BlobBytes(blobs []UnreferencedBlob) int64

BlobBytes sums the sizes of a candidate list, for a report line.

func CacheDir

func CacheDir() (string, error)

CacheDir resolves the cache root: `$XDG_CACHE_HOME/charly`, or `CHARLY_CACHE_DIR` when set. Every named store lives under it.

func DigestOf

func DigestOf(data []byte) (string, error)

DigestOf renders the sha256 content address of a byte slice, in the `sha256:<hex>` form the store and the artifact annotations use.

func Dir

func Dir(r Root) (string, error)

Dir resolves one of the four roots. It is THE resolver — no caller builds a `.cache` path by hand — and it resolves through the contract module (`spec/storeroot`), so the host and every plugin get the same answer from the same code.

func ImageStoreDir added in v0.2026322.1227

func ImageStoreDir() (string, error)

ImageStoreDir resolves the image store's layout directory: the `registry` named store under the cache root, through the ONE resolver (`StoreDir`), so `CHARLY_CACHE_DIR` relocates it with every other store. The build drive needs the DIR (a solve takes the layout as `--oci-layout <id>=<dir>`); it must never compose one, which is why there is no constructor taking a dir.

func NamedStores

func NamedStores() ([]string, error)

NamedStores lists every named store under the cache root, sorted. A store is a directory that LOOKS like an OCI image layout (it carries the `oci-layout` marker), so unrelated state under the root — lock directories, transient trees — is never mistaken for a store. A missing root is an empty list, never an error.

func Registry added in v0.2026322.2154

func Registry(s *Store) http.Handler

Registry answers the read-only subset of the OCI distribution API over ONE store.

func SameFile

func SameFile(a, b string) (bool, error)

SameFile reports whether two paths are the same file — the measurable form of "the view and the blob are one set of bytes". Callers ASSERT this rather than assuming it.

func StoreDir

func StoreDir(name string) (string, error)

StoreDir returns the directory of the named store `name` under the cache root. A store name is a single path element: it may not contain a separator, so a store can never escape the root.

This is store ADDRESSING, not root resolution — it joins a name onto the ONE cache root — so it stays beside the store it addresses, while the root itself comes from the contract module.

Types

type Entry

type Entry struct {
	// Key is the caller's cache key: the identity of the INPUTS, not of the bytes. It is
	// opaque to the store and is never derived from the payload.
	Key string `json:"key"`
	// MediaType is what the payload IS (an RFC 6838 type the consumer understands).
	MediaType string `json:"media_type"`
	// Payload is the single payload blob's digest ("" for a tree entry).
	Payload string `json:"payload,omitempty"`
	// Tree is the tree manifest's digest ("" for a single-file entry).
	Tree string `json:"tree,omitempty"`
	// Annotations is anything else the writer wants recorded — a resolved commit, an etag, a
	// submodule-completeness flag: the RESOLUTION RECORD D-STORE-5 needs, kept beside the key
	// and outside the payload's digest on purpose (a payload must not carry a timestamp).
	Annotations map[string]string `json:"annotations,omitempty"`
}

Entry is one keyed cache entry: what it IS, what KEY finds it, and where its payload lives.

Exactly one of Payload or Tree is set:

  • Payload — a single content-addressed blob; its VIEW is LinkBlob(payload, path).
  • Tree — a tree manifest (see tree.go); its VIEW is MaterializeTree(tree, dir), because a tree has no single payload digest by construction.

type ImageStore added in v0.2026322.1227

type ImageStore struct {
	// contains filtered or unexported fields
}

ImageStore is the charly image store: the named `registry` store, whose entries are artifacts keyed by the reference each build was asked for and addressed by the digest it resolved to.

func OpenImageStore added in v0.2026322.1227

func OpenImageStore() (*ImageStore, error)

OpenImageStore opens the charly image store at its resolved directory.

func (*ImageStore) Add added in v0.2026322.1227

func (s *ImageStore) Add(archivePath, ref string) error

Add lands an exported OCI archive as ONE store entry, KEYED BY THE ARTIFACT'S DIGEST and annotated with the reference it was built as.

The order is the contract: blobs first, the entry LAST, so a reader never observes a key whose payload is not yet published. Existing blobs are not rewritten (content-addressed bytes are the same bytes), and the entry's payload is the archive's own `index.json` — the OCI layout's entry point — so a single-platform and a multi-platform export are stored the same way and `Archive` reproduces either.

Nothing is DELETED here: a rebuild produces a different digest, hence a different key, hence a new entry beside the old one — which stays reachable by its own digest until a sweep reclaims it. That is what makes the reference an annotation rather than an identity: replacing the entry for a name would have thrown away the previous artifact's address.

The archive must ALREADY name ref with the export annotation, because the same file is what an engine load reads; a caller that leaned on the store to supply the name would still be feeding an unaddressable archive to that load. The payload is published with that annotation STRIPPED (D-STORE-6: a payload carries no name and no timestamp); the ENTRY carries both, where the store's own model puts a resolution record, and `Archive` re-applies the export annotation — the one surface that crosses the engine boundary.

func (*ImageStore) Archive added in v0.2026322.1227

func (s *ImageStore) Archive(ref string) (string, error)

Archive materialises ref as an OCI image archive in a NEW temporary file and returns its path. The file belongs to the CALLER, who removes it: an archive is as large as the image it carries, and only the consumer at the engine boundary knows when that load is done with it.

func (*ImageStore) Dir added in v0.2026322.1227

func (s *ImageStore) Dir() string

Dir is the layout directory.

func (*ImageStore) Has added in v0.2026322.1227

func (s *ImageStore) Has(ref string) (bool, error)

Has reports whether the store holds ref.

func (*ImageStore) List added in v0.2026322.1227

func (s *ImageStore) List() ([]string, error)

List returns every reference the store holds, deduplicated and sorted: the annotations the entries carry, not their keys — a caller elects a tag over references, and a rebuild leaves two entries naming one reference.

The KEYS are the store's inventory, and a sweep reads them through `Entries()` (key = digest, plus the reference and the build time), which is the surface D-STORE-7's "know what state references" needs.

func (*ImageStore) Lookup added in v0.2026322.1227

func (s *ImageStore) Lookup(ref string) (digest string, ok bool, err error)

Lookup returns the digest ref currently resolves to inside the store — the newest entry whose annotation names it.

func (*ImageStore) WriteArchive added in v0.2026322.1227

func (s *ImageStore) WriteArchive(ref string, w io.Writer) error

WriteArchive writes ref as an OCI image archive to w without staging a file.

type Orphan added in v0.2026287.2117

type Orphan struct {
	Dir   string
	Bytes int64
}

Orphan is one discovered layout tree: its directory and the bytes a sweep would reclaim.

Bytes counts EVERY file in the tree — including the `oci-layout` marker that makes it a layout in the first place — because that is what `os.RemoveAll` actually reclaims. A size that omitted the marker under-reported a real sweep by the marker's own bytes (measured while writing the first consumer's assertion).

func OrphanedLayouts added in v0.2026287.2117

func OrphanedLayouts(root string) ([]Orphan, error)

OrphanedLayouts returns the marker-carrying child layout trees of root, each sized, in ReadDir order (sorted by name, so a caller's output is stable).

The predicate is NamedStores() INVERTED, and that is the whole point

NamedStores() calls a marker-carrying child of the cache root a STORE. The same directory, found inside a store's own tree, is junk: a store keeps every byte in `blobs/<alg>/<digest>` and its entries in `index.json`, and never reads a child layout. One marker constant (`LayoutFile`), read in two directions, so the two readings cannot drift apart.

The CALLER names the root, because liveness is policy and this is mechanism

This function does NOT decide which layouts are orphaned, and it cannot: `NamedStores()` answers nothing here either — it returns exactly the marker-carrying children in question. A function that tried to guess "no merged writer still writes this" would be policy wearing a mechanism's name (the boundary law), so the contract is the opposite: the caller passes a root in which a marker-carrying child cannot be live. Two such roots exist, and both are the caller's to justify:

  • A STORE'S OWN TREE (`Store.Dir()`), where a child layout is an orphan BY CONSTRUCTION — the shape a retired per-ref writer leaves behind when the store moves into the path it used to write under.
  • A CACHE ROOT the migration table has RETIRED (a root no merged writer still writes), where the caller's justification is that retirement, recorded in that migration.

Discovery and sizing only — never deletion

Removing is the caller's, so that a sweep's destructive half stays with the surface that also reports it (`--dry-run` first, then the removal). This function opens nothing for writing.

A root that does not exist yet has no orphans and is never an error — the same shape `NamedStores()` uses for a missing cache root.

type Root

type Root = storeroot.Root

Root names one of the four roots — a RE-EXPORT of the contract module's type, not a second declaration, so a `storekit.Root` value IS a `storeroot.Root` value and the two can never drift into different root sets.

type Store

type Store struct {
	// contains filtered or unexported fields
}

A STORE TREE CONTAINS NO LOCKS. Measured on a live store (the wave lead's recon): one store directory carried a `.lock` file and a populated `locks/` tree beside its `oci-layout` and `blobs/`. That is a cache holding a lock, and the homes rule this codebase adopted is explicit: a lock is transient runtime state with no content address — a digest-keyed lock could even be SHARED between two processes that must not share it — so it belongs to the state root (host-global arbitration) or the runtime root (per-boot), never in a store.

This mechanism therefore never places a lock inside a store's tree, and NamedStores()'s layout-marker test exists so a stray `locks/` directory under the cache root is never mistaken for a store. Where the CURRENT `spec/cache` store does place one, that is that store's debt (opencharly/spec#233), not something a consumer should work around.

Store is ONE named OCI image layout under the cache root. Its `blobs/<alg>/<digest>` files ARE the cached bytes — the only copy of them anywhere on the host — and every consumer reads either a blob directly or a VIEW hard-linked from it.

func OpenStore

func OpenStore(name string) (*Store, error)

OpenStore opens the named store, resolving its path through the ONE cache root.

func OpenStoreDir

func OpenStoreDir(dir string) *Store

OpenStoreDir opens the store rooted at dir (an existing layout, or a path a pull will populate).

func (*Store) BlobPath

func (s *Store) BlobPath(dgst string) (string, error)

BlobPath returns the store's path for a content-addressed blob, so a caller can ASSERT that a view shares the store's bytes (`SameFile(store.BlobPath(d), viewPath)`) instead of trusting it.

There is deliberately NO ChmodBlob: a view is a HARDLINK, so chmod-ing the view changes the shared inode — the caller does `os.Chmod(viewPath, mode)` and the store stays out of file modes. Mode is not part of a digest, which is exactly why it is the consumer's concern and not an entry field.

func (*Store) Blobs

func (s *Store) Blobs() ([]string, error)

Blobs lists the digests the store holds, sorted.

func (*Store) DeleteEntry added in v0.2026288.2236

func (s *Store) DeleteEntry(key string) (bool, error)

DeleteEntry drops an entry's index pointer, returning whether an entry was there.

It removes the POINTER, never the payload: the payload is content-addressed and may be shared with another entry, so freeing it is a decision only a reachability sweep can make. That is why this and UnreferencedBlobs are one change rather than two — a store whose index cannot drop an entry keeps every digest it ever wrote live forever, and a sweep over such a store would be correct about a set that can never shrink.

The read-modify-write is serialized through the SAME lock indexEntry uses, so a delete racing a put cannot lose the other's write. It deliberately does NOT sweep: the caller runs UnreferencedBlobs afterwards if it wants the bytes back.

func (*Store) Dir

func (s *Store) Dir() string

Dir is the store's layout directory.

func (*Store) EnsureLayout added in v0.2026322.1227

func (s *Store) EnsureLayout() error

EnsureLayout creates the layout's blob directory and its `oci-layout` marker, so the directory IS an OCI image layout — the thing `NamedStores` recognises and an `oci-layout://` solve source requires. Idempotent: an existing marker is left untouched.

A store populated only through `PutBlob` needs no marker (its index is what its readers read); a store another PROCESS must discover as a layout — the image store, handed to a build daemon as `--oci-layout <id>=<dir>` — does.

func (*Store) Entries

func (s *Store) Entries() ([]Entry, error)

Entries lists every keyed entry in the store, sorted by key — the cache surface's inventory.

func (*Store) HasBlob

func (s *Store) HasBlob(dgst string) bool

HasBlob reports whether the store already holds a blob by digest — the primitive every caller needs BEFORE it does any work: a digest that is present is never fetched, copied or rebuilt.

func (*Store) LinkBlob

func (s *Store) LinkBlob(dgst, dest string) error

LinkBlob materializes a VIEW of a stored blob at dest: a HARDLINK, never a copy.

There is deliberately NO fallback. A copy would be a second set of bytes (the operator's mandate is "cached once"), and a cross-device fallback would hide a store that is not one filesystem — the single way the property could silently stop being true. A link failure is therefore a hard error that names the reason.

func (*Store) LookupEntry

func (s *Store) LookupEntry(key string) (*Entry, bool, error)

LookupEntry resolves an entry BY KEY — one index read, no payload bytes touched and no directory walk, which is what lets a caller decide HIT/MISS before fetching anything.

func (*Store) ManifestDigest added in v0.2026322.2154

func (s *Store) ManifestDigest(key string) (digest string, found bool, err error)

ManifestDigest answers D-STORE-10's question about ONE entry: which manifest blob does the store's own index point at for this KEY?

It is a separate reader from LookupEntry because the two answer different things. LookupEntry hands back the ENTRY (what the payload is); a distribution client asks for the MANIFEST ADDRESS, and a caller that tried to derive one from the other would be re-reading the index by hand — the second resolver this package exists to prevent.

The `bool` is "this key has a manifest", which is NOT "no error": an absent key is a 404 to the caller that asked, and an unreadable index is a 500. Collapsing them is how a missing image becomes a silent empty answer.

func (*Store) MaterializeTree

func (s *Store) MaterializeTree(entryDigest, dest string) error

MaterializeTree reconstructs a stored tree at dest as a tree of HARDLINKS to the store's blobs. Nothing is copied, and the file set is created deterministically (paths sorted) so a partial failure is reproducible rather than order-dependent.

func (*Store) PutBlob

func (s *Store) PutBlob(data []byte) (string, error)

PutBlob writes bytes into the store as a content-addressed blob and returns their digest. A blob that is already present is left untouched (the same bytes are the same file), and the write is atomic — tmp + rename — so a concurrent reader never sees a partial blob.

func (*Store) PutEntry

func (s *Store) PutEntry(e Entry) (string, error)

PutEntry stores an entry and indexes it by its key. It returns the entry manifest's digest. A later PutEntry with the same key REPLACES the index pointer; the previous payload stays in the store as the content-addressed blob it is (immutable, and still reachable by digest).

func (*Store) PutTree

func (s *Store) PutTree(dir, mediaType string) (string, error)

PutTree stores a directory as a tree entry and returns the digest of its MANIFEST blob (the entry's identity). Every file is a content-addressed blob, so identical files across trees — and across releases — are stored once; a file already present is not rewritten.

func (*Store) ReachableBlobs added in v0.2026288.2236

func (s *Store) ReachableBlobs() (map[string]bool, error)

ReachableBlobs returns every blob digest that the store still needs, directly or through a tree manifest.

It is the reference set a sweep subtracts from Blobs(), exposed because a caller may want to reason about liveness without listing the unreferenced side. A store with no entries reaches nothing and returns an empty set, not an error: an unpopulated store is empty, never broken — the same shape NamedStores() and OrphanedLayouts() both use.

Three references, and the one a first draft misses

The index descriptor for each key carries the ENTRY MANIFEST's digest, and that manifest is itself a blob — the thing PutEntry returns. So an entry reaches blobs by three routes:

index descriptor .Digest  ->  the entry manifest blob
entry.Payload             ->  one payload blob
entry.Tree                ->  the tree's MANIFEST blob -> TreeEntry.Files[*].Digest -> many

The first is easy to miss, because Entry (the decoded manifest) contains no field for it: the pointer lives in `index.json`, one level up. A sweep that reads only Entries() therefore calls every entry manifest unreferenced and deletes the store's own descriptors — measured here by a test that failed on exactly that, naming a 142-byte blob where an 11-byte payload was expected.

func (*Store) ReadBlob

func (s *Store) ReadBlob(dgst string) ([]byte, error)

ReadBlob returns a blob's bytes, VERIFIED against the digest they are addressed by. Content addressing is the point: it is what makes a store entry immutable and a cache hit safe.

func (*Store) ReadEntry

func (s *Store) ReadEntry(key string) (*Entry, error)

ReadEntry is LookupEntry for a caller that requires the key to exist.

func (*Store) ReadTree

func (s *Store) ReadTree(entryDigest string) (*TreeEntry, error)

ReadTree decodes a tree entry's manifest.

func (*Store) RemoveBlob added in v0.2026288.2236

func (s *Store) RemoveBlob(dgst string) error

RemoveBlob deletes ONE blob by digest. It is the caller's destructive half, never implicit.

It REFUSES a digest an entry still reaches: a sweep that has not re-read the store since it listed candidates must not be able to free live bytes on a second call. That check is one Entries() walk, and it is the difference between a GC and a delete primitive.

func (*Store) UnreferencedBlobs added in v0.2026288.2236

func (s *Store) UnreferencedBlobs() ([]UnreferencedBlob, error)

UnreferencedBlobs lists the store's blobs that no entry reaches, with sizes, sorted by digest.

READ-ONLY. It removes nothing — see the header. The caller decides what to do with the list, and RemoveBlob is how it does it.

type TreeEntry

type TreeEntry struct {
	// MediaType is the tree's own RFC 6838 media type — never a bare "tar" by convention.
	MediaType string `json:"media_type"`
	// Files maps a slash-separated RELATIVE path to its blob and mode.
	Files map[string]TreeFile `json:"files"`
}

TreeEntry is a stored directory payload: every file by content address, plus the media type that says what the tree IS (e.g. a BuildKit cache export, a repo view).

type TreeFile

type TreeFile struct {
	// Digest is the file's content address (its blob in this store).
	Digest string `json:"digest"`
	// Mode is the file's permission bits. Mode is NOT part of a digest, so it travels here
	// and is re-applied on materialization.
	Mode uint32 `json:"mode"`
}

TreeFile is one file inside a stored tree.

type UnreferencedBlob added in v0.2026288.2236

type UnreferencedBlob struct {
	// Digest is the blob's content address, as Blobs() reports it (`<alg>:<hex>`).
	Digest string
	// Size is the blob file's length in bytes.
	Size int64
}

UnreferencedBlob is one blob no entry reaches, with the bytes it occupies.

Size is the file's own length, which is what removing it frees: a blob is content-addressed and linked — never copied — into views, so its own bytes are the only bytes attributable to it here. A caller that reports a total should say "up to", for the same reason `/charly-core:clean` says it of `--deep`: a link means the freed space can be less than the sum.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL