Documentation
¶
Overview ¶
Package utils contains utility functions for use throughout git-dolt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToFile ¶
AppendToFile appends the given string to the given file in the current directory, creating it if it does not exist.
func CurrentRevision ¶
CurrentRevision gets the commit hash of the currently checked-out revision of the dolt repo at the given dirname.
func EnsureSuffix ¶
EnsureSuffix adds a suffix to a string if not already present.
func FindGitConfigDir ¶
FindGitConfigDir will recurse upwards from currentPath to terminalPath looking for a directory named .git, returning its path if found, and an error if not.
Both currentPath and terminalPath are assumed to be absolute paths. An error is returned if currentPath is not a descendant of terminalPath.
func FindGitConfigUnderRoot ¶
FindGitConfigUnderRoot will recurse upwards from the current working directory to the system root looking for a directory named .git, returning its path if found, and an error if not.
func LastSegment ¶
LastSegment gets the last segment of a slash-separated string.
Types ¶
This section is empty.