checkout

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package checkout handles workspace materialization and .gitignore management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToGitignore

func AddToGitignore(target string) error

AddToGitignore ensures the directory containing target has a .gitignore entry that ignores target, matching DVC: one .gitignore per directory, entry "/<basename>" with POSIX separators, idempotent.

func Materialize

func Materialize(c *cache.Cache, out dvcfile.Out, wsPath string, types []LinkType) error

Materialize reconstructs the workspace path for out from cache objects using the given link strategies (reflink/hardlink/symlink/copy). Files already matching are left untouched. For directories, workspace files absent from the manifest are pruned, matching `dvc checkout`.

Types

type LinkType

type LinkType string

LinkType is a cache.type strategy.

const (
	Reflink  LinkType = "reflink"
	Hardlink LinkType = "hardlink"
	Symlink  LinkType = "symlink"
	Copy     LinkType = "copy"
)

func ParseCacheTypes

func ParseCacheTypes(s string) []LinkType

ParseCacheTypes parses a cache.type value ("reflink,copy") into an ordered list of strategies, defaulting to DVC's default (reflink, copy).

Jump to

Keyboard shortcuts

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