Skip to main content

Module extension

Module extension 

Source
Expand description

Pointer extension config (lfs.extension.<name>.{clean,smudge,priority}).

Extensions chain external programs around each LFS object’s clean/smudge cycle (docs/extensions.md). They’re declared via three keys per extension; priority is the only one that can come from .lfsconfig.

Structs§

ExtensionConfig
One configured extension. Missing knobs come back as empty/0 to mirror upstream’s zero-value Extension struct — callers that run extensions must reject empty clean/smudge themselves.

Functions§

list_extension_names
Discover extension names from any source — local/global/system git config plus .lfsconfig. We deliberately enumerate from raw config (rather than get_effective) because we want to find names declared only in .lfsconfig too; the per-key resolution still goes through get_effective so the safe-key filter is honored.
list_extensions
Discover and resolve every configured extension. Sorted ascending by priority, with name as the tiebreaker so duplicate priorities (which upstream errors on, but which we currently surface) at least come out deterministically.