You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
master is actually hard-coded quite a lot in tsrc code base, which was fine until the transition from master to main started (quite a long time ago actually)
There are a few places where it's easy to remove. See #346 for instance.
One place it's not is in the manifest yaml config.
Three ideas:
1/ change the schema so that you have to specify a branch for each repo
2/ change the schema so you can specify a default branch globally
3/ allow tsrc to operate with repo configuration lacking a branch al together
I think 1/ is pretty reasonable. It's a breaking change, but a small one.
3/ is retro-compatible but it's going to take a lot of work and I'm not sure the complexity is worth it.
2/ is easy but existing manifests will need to get patched quite a lot.
Thoughts ?
The text was updated successfully, but these errors were encountered:
So ... I went ahead and try implementing 3/ but there's an issue.
But tsrc is not like other tools.
Currently, when we parse the manifest we put master in the Repo.branch attribute if there's no branch set in the manifest.
If we allow Repo.branch to be None we can clone the repo just fine, but we can no longer sync:
* foo : Current branch: 'main' does not match expected branch: 'None'
Now we could have sync NOT check for the current branch but I don't think this is a good idea.
You see, other tools just read the HEAD ref of the remote to get the default branch, but we're not like other tools.
In fact, I think we should not do 3 at all. After all, we use tsrc to make sure all team mates have the same repos cloned at the same relative paths at the same branch, and we want to do this consistently.
Imagine we implement solution 3 and you have an old manifest branch, dating back when HEAD was 'master'. If you change the HEAD to 'main', then the old manifest would break ...
See #345 for some context.
master
is actually hard-coded quite a lot intsrc
code base, which was fine until the transition frommaster
tomain
started (quite a long time ago actually)There are a few places where it's easy to remove. See #346 for instance.
One place it's not is in the manifest yaml config.
Three ideas:
1/ change the schema so that you have to specify a branch for each repo
2/ change the schema so you can specify a default branch globally
3/ allow tsrc to operate with repo configuration lacking a branch al together
I think 1/ is pretty reasonable. It's a breaking change, but a small one.
3/ is retro-compatible but it's going to take a lot of work and I'm not sure the complexity is worth it.
2/ is easy but existing manifests will need to get patched quite a lot.
Thoughts ?
The text was updated successfully, but these errors were encountered: