From 92cf3c88a993ad32a814ec2c498120c02f2f2061 Mon Sep 17 00:00:00 2001 From: Hariom Verma Date: Mon, 28 Feb 2022 19:29:42 +0530 Subject: [PATCH] Fix Clone error when repository contains tags In initial_ref_transaction_commit(), check for D/F conflicts (i.e., conflict that exists between "refs/foo" and "refs/foo/bar") among the references being created and between the references being created and any hypothetical existing references0. Ideally, there shouldn't *be* any existing references when this function is called. But, here Fetch() seems to create tag refrences prior to git. Set TagMode to NoTags. Signed-off-by: Hariom Verma --- cmd/git-remote-gitopia/gitopia.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/git-remote-gitopia/gitopia.go b/cmd/git-remote-gitopia/gitopia.go index 697f795..97bbfc1 100644 --- a/cmd/git-remote-gitopia/gitopia.go +++ b/cmd/git-remote-gitopia/gitopia.go @@ -152,6 +152,7 @@ func (h *GitopiaHandler) Fetch(remote *core.Remote, sha, ref string) error { fetchOptions := &git.FetchOptions{ RemoteName: "gitopia-objects-store", Progress: os.Stdout, + Tags: git.TagMode(3), } err = remote.Repo.Fetch(fetchOptions)