Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallHook ¶ added in v0.2.0
func InstallHook() error
InstallHook installs the commit-msg hook in the current git repository
Example usage:
if err := git.InstallHook(); err != nil { fmt.Printf("Error installing hook: %v\n", err) return }
Prints a success message if the hook is installed successfully
Types ¶
type Commit ¶
func GetCommits ¶
GetCommits returns a list of commits from a commit range
The function accepts a Git commit range (e.g., "HEAD~5..HEAD") and returns a list of commits in the range.
Example usage:
commits, err := git.GetCommits("HEAD~5..HEAD") if err != nil { fmt.Printf("Error getting commits: %v\n", err) return }
Returns a list of commits or an error if the command fails
Click to show internal directories.
Click to hide internal directories.