forked from TrueCloudLab/dco-go
Rename PR head variable
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
3ba16336e5
commit
102e7d41c0
1 changed files with 2 additions and 3 deletions
5
main.go
5
main.go
|
@ -25,13 +25,13 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the commit history.
|
// Retrieve the commit history.
|
||||||
ref, err := r.Head()
|
head, err := r.Head()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to retrieve HEAD reference: %v", err)
|
log.Fatalf("Failed to retrieve HEAD reference: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create iterator over commits.
|
// Create iterator over commits.
|
||||||
commits, err := r.Log(&git.LogOptions{From: ref.Hash()})
|
commits, err := r.Log(&git.LogOptions{From: head.Hash()})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to retrieve commit history: %v", err)
|
log.Fatalf("Failed to retrieve commit history: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -81,4 +81,3 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue