-
Notifications
You must be signed in to change notification settings - Fork 339
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
bookmark: Make moving a bookmark onto a hidden commit a warning #5050
base: main
Are you sure you want to change the base?
Conversation
To be used in the next diff. Also simplify the `hidden()` revset with it.
… warning This was discussed in the Discord a while ago. While I still think we should make it a hard error at some point, lets get some feedback to see how often it actually occurs.
IMHO, adding a tag or a bookmark to a hidden commit should make it visible. |
Have a reference for that, beside you?
While it works, it shouldn't really be a option since those commits should be addressable in the perfect model anyway. It is a mistake to address a predecessor as existing in the repo.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding a tag or a bookmark to a hidden commit should make it visible.
That's a good point. I'm not sure it's useful in practice, but the behavior is consistent.
(Un-hidden commits can be warned, but that would also apply to jj new
.)
let view = workspace_command.repo().view(); | ||
let is_hidden = target_commit.is_hidden(repo.deref())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: .as_ref()
(or something like &*repo
.)
You might find some if you look for "branch" and "hidden" on discord.
I know the current state of affairs. |
I'm unsure what makes a commit hidden, and if there could be confusion between "commit" and "change" in this context.
Would this apply to the use case of taking the current |
The set of visible commits is defined by a set of visible heads. Some pretty low-level library code adds new commits to that set because we generally want new commits to be visible. Until #4427, |
The only conversation which talks about this behavior is already mentioned, so this clearly doesn't qualify for a "reference beside you".
That also works for me, I actually made this patchset explicitly a warning to see how many complaints it will receive when it lands, since we don't know how many people actually use the workflow @tim-janik argues for. |
There are several discussions if you bother searching for "hidden branch" or "branch hidden" on the jj discord server, but AFAIK there is no way to link to searches on discord. You could also search on GH and might find #4537, etc, but really, this point is nothing more than a distraction. |
You can link the individual messages, so provide them if you care so much instead calling my argument a shallow dismissal. |
This was discussed in Discord a while ago, while I'm still in favor of making it a hard error down the line, it currently is just implemented as a warning to get user feedback.
TODO: write tests and update CHANGELOG.md
Checklist
If applicable:
CHANGELOG.md