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: allow both --branch/--bookmark for git fetch/push #4597

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

martinvonz
Copy link
Owner

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

`jj git push` has a `--bookmark` argument, which takes a list of
bookmarks to push to the Git remote. They'll become branches on the
Git remote. `jj git fetch` has a `--branch` argument, which takes a
list of Git branches to fetch. They'll become bookmarks once
fetched. So the naming is consistent, but the reasoning is quite
subtle. Let's provide the other name as a hidden alias to help users
who get it wrong.
@martinvonz martinvonz merged commit b90d60c into main Oct 7, 2024
31 checks passed
@martinvonz martinvonz deleted the push-nnwkqkurywpo branch October 7, 2024 17:08
@martinvonz
Copy link
Owner Author

Hmm, sorry, I already merged this. It might be one of those controversial patches that we should have given people more time to comment on. We can roll it back if people have concerns.

@emilazy
Copy link
Collaborator

emilazy commented Oct 7, 2024

FWIW I have personally been feeling like the --branch arguments are leading me to periodically forget that they’re bookmarks now and that I’d sort of prefer it to just be --bookmark for both fetch and push, always referring to the concept used on the Jujutsu end.

@martinvonz
Copy link
Owner Author

I’d sort of prefer it to just be --bookmark for both fetch and push

I might forget to check on this PR to see if others give any feedback. You could send a PR dropping the --branch names so we can't forget.

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