diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/latest/latest.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/latest/latest.go b/examples/latest/latest.go index 9faf59f..2ccddf1 100644 --- a/examples/latest/latest.go +++ b/examples/latest/latest.go @@ -18,12 +18,8 @@ func main() { panic(err) } - hash, err := r.Remotes[git.DefaultRemoteName].Head() - if err != nil { - panic(err) - } - - commit, err := r.Commit(hash) + head := r.Remotes[git.DefaultRemoteName].Head() + commit, err := r.Commit(head.Hash()) if err != nil { panic(err) } |