Skip to content

Instantly share code, notes, and snippets.

@perillo perillo/git.diff
Created Feb 20, 2020

Embed
What would you like to do?
diff --git a/src/cmd/go/internal/modfetch/codehost/git.go b/src/cmd/go/internal/modfetch/codehost/git.go
index f08df512f0..823c680f72 100644
--- a/src/cmd/go/internal/modfetch/codehost/git.go
+++ b/src/cmd/go/internal/modfetch/codehost/git.go
@@ -277,6 +277,7 @@ const minHashDigits = 7
// stat stats the given rev in the local repository,
// or else it fetches more info from the remote repository and tries again.
func (r *gitRepo) stat(rev string) (*RevInfo, error) {
+ fmt.Println("r.local:", r.local)
if r.local {
return r.statLocal(rev, rev)
}
@@ -467,9 +468,11 @@ func (r *gitRepo) statLocal(version, rev string) (*RevInfo, error) {
// ede458df7cd0fdca520df19a33158086a8a68e81 1523994202 HEAD -> master, tag: v1.2.4-annotated, tag: v1.2.3, origin/master, origin/HEAD
for i := 2; i < len(f); i++ {
if f[i] == "tag:" {
+ fmt.Println("found tag", f[i], f[i+1])
i++
if i < len(f) {
info.Tags = append(info.Tags, strings.TrimSuffix(f[i], ","))
+ fmt.Println("added tags", info.Tags)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.