Instead of adding to RpmLocation, just append .git to remote

This commit is contained in:
Mustafa Gezen 2021-04-12 00:36:35 +02:00
parent 0ad69ea6fc
commit 3b0face514
2 changed files with 3 additions and 3 deletions

View File

@ -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{}
}

View File

@ -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 {