MCPcopy Index your code
hub / github.com/docker/docker-agent / resolveCreateConfig

Function resolveCreateConfig

pkg/worktree/worktree.go:86–92  ·  view source on GitHub ↗

resolveCreateConfig applies opts on top of the defaults. The worktrees root defaults to the data directory; [WithRoot] overrides it (mainly for tests and embedders that need an isolated location).

(opts []CreateOption)

Source from the content-addressed store, hash-verified

84// defaults to the data directory; [WithRoot] overrides it (mainly for tests
85// and embedders that need an isolated location).
86func resolveCreateConfig(opts []CreateOption) createConfig {
87 cfg := createConfig{root: paths.GetDataDir()}
88 for _, opt := range opts {
89 opt(&cfg)
90 }
91 return cfg
92}
93
94// WithBase branches the worktree from ref instead of the repository's current
95// HEAD. ref is any revision git understands (a branch, tag, commit, or

Callers 2

CreateFunction · 0.85
CreatePRFunction · 0.85

Calls 1

GetDataDirFunction · 0.92

Tested by

no test coverage detected