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

git: prep for importing refs/heads/* as @git remote branches #2309

Merged
merged 3 commits into from
Sep 30, 2023

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Sep 29, 2023

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

…te refs

If we made @git branches real .remote_targets["git"], remotely-rewritten
commits could also be pinned by the @git branches, and therefore wouldn't be
abandoned. We could exclude the "git" remote, but I don't think local commits
should be pinned by remote refs in general. If we squashed a fetched commit,
remote ref would point to a hidden commit anyway.
I'll probably reorganize the local/remote branches structure, so let's
minimize call sites which rely on the BranchTarget struct.
There aren't many callers, but let's add it for consistency.
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.

Looks good! Thanks, Yuya!

On a related note, I'd like to have a chance to understand the plan to "importing refs/heads/* as @git remote branches" before we entirely commit to it. I'm assuming this is related to #2304. I hope this won't introduce much of a delay; if it does I guess I'll just have to step aside and think about it after the fact.

@yuja
Copy link
Contributor Author

yuja commented Sep 30, 2023

"importing refs/heads/* as @git remote branches" before we entirely commit to it. I'm assuming this is related to #2304.

Yes. The first half will just copy refs/heads to .remote_targets["git"] (and remove special case for remote_name == "git".) I'll send it after the default log revset get updated. Then, I'll send the remaining patches which will change the undo behavior as described in #2304.

Thanks for the review.

@yuja yuja merged commit f0f1d72 into jj-vcs:main Sep 30, 2023
15 checks passed
@yuja yuja deleted the push-noosorqomvnt branch September 30, 2023 03:02
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.

3 participants