Page MenuHomePhorge

Add config option for default branch name
Open, Needs TriagePublic

Description

Personally, I'd appreciate adding a configuration/setting to specify the default branch name when creating a new diffusion repository (if type is git).
Currently, this is hardcoded to "master":

https://we.phorge.it/source/phorge/browse/master/src/applications/repository/storage/PhabricatorRepository.php;7c1487e4dcfab19e0ef42cd4596780a37e0c8c4e$874

Event Timeline

Just clarifying - this is for specifying the initial default value for the Default Branch field that can currently be edited after creation?

valerio.bozzolan subscribed.
In T15491#10740, @speck wrote:

Just clarifying - this is for specifying the initial default value for the Default Branch field that can currently be edited after creation?

AFAIK yep, so that if I have one billion repositories with main branch only, I can set that global configuration without setting "main" as Default Branch 1 billion times.

(we were chatting about this on IRC)

In T15491#10740, @speck wrote:

Just clarifying - this is for specifying the initial default value for the Default Branch field that can currently be edited after creation?

Yes, that is indeed what I'd be looking for.

avivey subscribed.

This might be a Good Starter Task, I think - you'll need to add a class for the config, and pull the config value in diffusion.