`rad init` default branch uses current reference
I was watching someone use rad init recently, and they had to stop for a second when they were choosing the default branch and it pointed to HEAD.
This seems confusing and it might be better to use Git’s underlying configuration value for default branches.
Do you mean, when the user specifies a default branch it should use current head for a branch matching that name as stored in
.git/refs/heads?i.e.:
will initialize radicle repository with a default branch named
masterusing the commit current pointed to in.git/refs/heads/master?if so,
HEAD? or just error to the user, telling them they need to pick an existing branch?No, sorry perhaps I wasn’t clear. When you call
rad inittheres a wizard setup, where it prompts you title, description, default branch, and visibility.When it comes to prompting you with the default branch, it will use the current reference you’re on. If you use
jj, like me, there’s a high chance you’ll be in a detached head state, and so the default reference will beHEAD. I’m proposing we use the user’s config value – if it is set – instead.To answer your questions:
It will error
It will also error :)
Would you be looking for something akin to what I have in this draft patch?
The patch was merged, so closing this now.