cmd/go/internal/modfetch/gitrepo: fix bug loading tags

This was introduced by the r.remote -> origin cleanup
and breaks TestConvertLegacyConfig.

Change-Id: I877e9ecd39b86e240bc696a4c7c7e13b40e2079d
Reviewed-on: https://go-review.googlesource.com/117355
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go b/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go
index 49c9a5b..0d6eb4b 100644
--- a/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go
+++ b/vendor/cmd/go/internal/modfetch/gitrepo/fetch.go
@@ -106,7 +106,7 @@
 	// The git protocol sends all known refs and ls-remote filters them on the client side,
 	// so we might as well record both heads and tags in one shot.
 	// Most of the time we only care about tags but sometimes we care about heads too.
-	out, err := codehost.Run("", "git", "ls-remote", "-q", r.remote)
+	out, err := codehost.Run(r.dir, "git", "ls-remote", "-q", r.remote)
 	if err != nil {
 		r.refsErr = err
 		return