mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Add integration test that accesses commit properties in a custom command
Useful as a regression test to check that the following commit doesn't break it.
This commit is contained in:
@ -55,3 +55,11 @@ func (self *Git) Version() *git_commands.GitVersion {
|
||||
}
|
||||
return version
|
||||
}
|
||||
|
||||
func (self *Git) GetCommitHash(ref string) string {
|
||||
output, err := self.shell.runCommandWithOutput([]string{"git", "rev-parse", ref})
|
||||
if err != nil {
|
||||
log.Fatalf("Could not get commit hash: %v", err)
|
||||
}
|
||||
return strings.TrimSpace(output)
|
||||
}
|
||||
|
Reference in New Issue
Block a user