Created
December 30, 2020 12:33
-
-
Save percybolmer/1c297e29b6b8630a819840962d25bde0 to your computer and use it in GitHub Desktop.
The old code from 41-67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r, err := git.PlainOpen(path) | |
if err != nil { | |
log.Fatal("Error opening Repository: ", err) | |
} | |
ref, err := r.Head() | |
if err != nil { | |
log.Fatal("Unable to get repository HEAD:", err) | |
} | |
cIter, err := r.Log(&git.LogOptions{From: ref.Hash()}) | |
if err != nil { | |
log.Fatal("Unable to get repository commits:", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment