From 3b0face514fd67405469dc10451ef510861fe4f5 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Mon, 12 Apr 2021 00:36:35 +0200 Subject: [PATCH] Instead of adding to RpmLocation, just append .git to remote --- cmd/srpmproc/main.go | 4 ++-- internal/git.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/srpmproc/main.go b/cmd/srpmproc/main.go index 9b64afe..0a792dc 100644 --- a/cmd/srpmproc/main.go +++ b/cmd/srpmproc/main.go @@ -96,9 +96,9 @@ func mn(_ *cobra.Command, _ []string) { importer = &internal.SrpmMode{} } else { if moduleMode { - sourceRpmLocation = fmt.Sprintf("%s/%s.git", modulePrefix, sourceRpm) + sourceRpmLocation = fmt.Sprintf("%s/%s", modulePrefix, sourceRpm) } else { - sourceRpmLocation = fmt.Sprintf("%s/%s.git", rpmPrefix, sourceRpm) + sourceRpmLocation = fmt.Sprintf("%s/%s", rpmPrefix, sourceRpm) } importer = &internal.GitMode{} } diff --git a/internal/git.go b/internal/git.go index 5fcadcb..52a4c59 100644 --- a/internal/git.go +++ b/internal/git.go @@ -73,7 +73,7 @@ func (g *GitMode) RetrieveSource(pd *data.ProcessData) *data.ModeData { refspec := config.RefSpec("+refs/heads/*:refs/remotes/*") remote, err := repo.CreateRemote(&config.RemoteConfig{ Name: "upstream", - URLs: []string{pd.RpmLocation}, + URLs: []string{fmt.Sprintf("%s.git", pd.RpmLocation)}, Fetch: []config.RefSpec{refspec}, }) if err != nil {