File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/AnalyticsGen/Providers/Forgejo Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,15 @@ struct ForgejoRemoteRepoProvider: RemoteRepoProvider {
3939 Log . debug ( " Cloning repository... " )
4040 switch ref {
4141 case . tag( let name) , . branch( let name) :
42- try shell ( " git clone --depth 1 -b \( name) \( gitRepositoryURL) \( repositoryPath) " )
43-
4442 if ProcessInfo . processInfo. environment [ " ANALYTICS_GEN_EXPERIMENTAL_MERGE " ] == " true " &&
4543 ProcessInfo . processInfo. environment [ " CHANGE_TARGET " ] == " develop "
4644 {
4745 Log . debug ( " Trying to merge master into user branch " )
46+ try shell ( " git clone -b \( name) \( gitRepositoryURL) \( repositoryPath) " )
4847 try shell ( " cd \( repositoryPath) && git fetch --depth 1 origin refs/heads/master:refs/remotes/origin/master " )
49- try shell ( " cd \( repositoryPath) && git merge origin/master --allow-unrelated-histories --no-edit " )
48+ try shell ( " cd \( repositoryPath) && git merge origin/master --no-edit " )
49+ } else {
50+ try shell ( " git clone --depth 1 -b \( name) \( gitRepositoryURL) \( repositoryPath) " )
5051 }
5152 case . commit( let sha) :
5253 try shell ( " git clone \( gitRepositoryURL) \( repositoryPath) " )
You can’t perform that action at this time.
0 commit comments