Documentation
¶
Index ¶
Constants ¶
View Source
const ( IgnoreFile = ".gitignore" IgnoreDefaultMode = 0644 )
Variables ¶
View Source
var ( ErrNotARepository = errors.New("not a git repository") ErrNoGit = errors.New("no git support") )
Functions ¶
func GetRepositoryPath ¶
GetRepositoryPath Returns the git repository root path if dir is a directory inside a git repository, otherwise returns error
func Ignore ¶
Ignore modify/create .ignore file to include a section headed by the marker string and contains the provided ignore and exclude paths. If section exists, it will append paths to the given section, otherwise writes the section at the end of the file. All file paths must be absolute. dir is a path in the git repository, if a .gitignore file is not found, a new file will be created in the repository root
func IsRepository ¶
IsRepository Return true if dir is a path to a directory in a git repository, false otherwise
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.