aboutsummaryrefslogtreecommitdiffstats
path: root/examples/latest
diff options
context:
space:
mode:
Diffstat (limited to 'examples/latest')
-rw-r--r--examples/latest/latest.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/examples/latest/latest.go b/examples/latest/latest.go
deleted file mode 100644
index 05f583a..0000000
--- a/examples/latest/latest.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "gopkg.in/src-d/go-git.v4"
-)
-
-func main() {
- url := os.Args[1]
-
- fmt.Printf("Retrieving latest commit from: %q ...\n", url)
- r := git.NewMemoryRepository()
-
- if err := r.Clone(&git.CloneOptions{URL: url}); err != nil {
- panic(err)
- }
-
- head, err := r.Head()
- if err != nil {
- panic(err)
- }
-
- commit, err := r.Commit(head.Hash())
- if err != nil {
- panic(err)
- }
-
- fmt.Println(commit)
-}