mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #33771 from overleaf/mj-git-bridge-default-main
[git-bridge] Default new projects to main rather than master GitOrigin-RevId: 3d7d60c0aab6e5d0d10d282d6d491d4f735ed94c
This commit is contained in:
@@ -14,6 +14,7 @@ import org.apache.commons.io.IOUtils;
|
||||
import org.eclipse.jgit.api.Git;
|
||||
import org.eclipse.jgit.api.ResetCommand;
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||
@@ -83,6 +84,8 @@ public class GitProjectRepo implements ProjectRepo {
|
||||
return;
|
||||
}
|
||||
repo.create();
|
||||
// Set default branch to "main" for new projects
|
||||
repo.updateRef(Constants.HEAD).link("refs/heads/main");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user