Open ceedubs opened 1 year ago
Indeed it is awkward, but we had decided (for now) that we ought not to disallow a technically-valid state.
@mitchellwrosen once in this state, how would one create an empty main
branch for their technically-valid project?
With some digging I found that there was a branch.empty
command, but it doesn't seem that I can use it:
.> branch.empty /httpserver/main
branch.empty (or branch.create-empty, create.empty-branch)
Create a new empty branch.
I also think that the behavior of branch.create
from a (root) namespace (not within the project) forking the root namespace into the new branch is probably never want people want/expect. But maybe that would be less of a problem if it didn't take minutes to delete the branch afterwards.
@mitchellwrosen once in this state, how would one create an empty main branch for their technically-valid project?
Hrm... I suppose today it would have to be like
.> cd asdfkjasdf
.asdfkjasdf> branch.create-empty foo/main
:sweat_smile:
I also think that the behavior of branch.create from a (root) namespace (not within the project) forking the root namespace into the new branch is probably never want people want/expect. But maybe that would be less of a problem if it didn't take minutes to delete the branch afterwards.
Yeah, agreed. Though we are somewhat unkeen on adding too many code paths that treat the root namespace differently than all others, because we want to refactor away from having all code loaded into one namespace in the first place.
If you have only one branch in a project (let's say project
foo
and branchmain
) and you delete it, it's unclear how to continue to use the project.If you try
switch foo
then it says thatfoo/main
doesn't exist.If you try
branch foo/main
then it will createmain
from your current namespace, which is likely the root of your codebase (and in my case takes ages to subsequentlydelete.branch
).