Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitState ¶
type GitState struct {
// Date is the current commit datetime.
Date time.Time
// IsDirty indicates whether there are uncommitted changes.
IsDirty bool
// IsRepo indicates whether the directory is a Git repository.
IsRepo bool
// SHA is the full SHA-1 (40 characters) of the current commit.
SHA string
}
GitState contains information about the Git repository state.
func InspectGitState ¶
InspectGitState inspects the Git repo state from the specified directory. If the directory is not a Git repository, or if git utility is not available, returns GitState with IsRepo=false and no error.
Click to show internal directories.
Click to hide internal directories.