Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: A revset to determine the main branch in a repository. #3113

Closed
PhilipMetzger opened this issue Feb 21, 2024 · 6 comments
Closed

FR: A revset to determine the main branch in a repository. #3113

PhilipMetzger opened this issue Feb 21, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@PhilipMetzger
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Add a revset to determine the quasi main "branch" in a repository, similar to immutable_heads().

Describe the solution you'd like
Add some repo- and user setting to determine a main branch in a repository, as it will be useful for the jj native forge.
As it probably won't be as branching oriented as Git is.

Additional context
This was previously a hidden FR in #1431.

@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Feb 21, 2024
@PhilipMetzger
Copy link
Contributor Author

Anothre issue which relates to this is #1415.

@thoughtpolice
Copy link
Member

Isn't this just trunk()?

@PhilipMetzger
Copy link
Contributor Author

No, trunk() is a approximation to work with Git :-), this one is independant of backend.

@yuja
Copy link
Contributor

yuja commented Feb 22, 2024

No, trunk() is a approximation to work with Git :-), this one is independant of backend.

In what way trunk() is Git specific? If there's a jj native repo, I expect trunk() will be resolved to the main branch in that context. If the branching model is quite different from ::<head-commit-of-the-main-branch>, trunk() wouldn't work, though.

@martinvonz
Copy link
Member

I also don't understand what this FR is about. FWIW, we have overridden trunk at Google to count main@piper as our trunk (piper is the name of our internal, non-Git remote).

@PhilipMetzger
Copy link
Contributor Author

I made some mistakes yesterday, as mentioned trunk() adresses this issue, so I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants