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

clean up remainder of old branch API, with minor behavior changes in CLI output #3967

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Jun 26, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 4 commits June 27, 2024 21:44
Since we've split (local, remotes) branches to (locals, remotes { branches }),
.has_branch() API no longer makes much sense. Callers often need to check if
a remote branch is tracked.
It's used only in transaction descriptions, and I think singular form works
at adjective position.
This will help inline view.remove_branch() in cmd_branch_forget(). I don't
care much about owned (String, _) vs (&str, _), but we can't simplify the
lifetime issue in find_forgettable_branches() anyway. So I made all callers
pass cloned Arc<ReadonlyRepo> and borrow (name, target) pairs from there.
This API no longer makes sense, and we'll probably add some flags to forget
only tracked remotes for example.
@yuja yuja force-pushed the push-rszoykmxpnno branch from 61fdf7a to a3fc12f Compare June 27, 2024 13:05
Copy link
Contributor

@ilyagr ilyagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, Yuya!

@yuja yuja merged commit 76ff35e into jj-vcs:main Jun 28, 2024
17 checks passed
@yuja yuja deleted the push-rszoykmxpnno branch June 28, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants