Documentation ¶
Overview ¶
Package scm abstracts operations on various tools like git Currently, only git is supported.
Adapted from https://github.com/thought-machine/please/tree/master/src/scm Copyright Thought Machine, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Package scm abstracts operations on various tools like git Currently, only git is supported.
Adapted from https://github.com/thought-machine/please/tree/master/src/scm Copyright Thought Machine, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Adapted from https://github.com/thought-machine/please/tree/master/src/scm Copyright Thought Machine, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFallback = errors.New("cannot find a .git folder. Falling back to manual file hashing (which may be slower). If you are running this build in a pruned directory, you can ignore this message. Otherwise, please initialize a git repository in the root of your monorepo")
Functions ¶
This section is empty.
Types ¶
type SCM ¶
type SCM interface { // ChangedFiles returns a list of modified files since the given commit, optionally including untracked files.*/ ChangedFiles(fromCommit string, toCommit string, includeUntracked bool, relativeTo string) ([]string, error) }
An SCM represents an SCM implementation that we can ask for various things.
func FromInRepo ¶
func FromInRepo(repoRoot titanpath.AbsoluteSystemPath) (SCM, error)
FromInRepo produces an SCM instance, given a path within a repository. It does not need to be a git repository, and if it is not, the given path is assumed to be the root.