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

cli: let jj git push --change handle large revsets #3924

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

thoughtpolice
Copy link
Collaborator

@thoughtpolice thoughtpolice commented Jun 19, 2024

In a repo of mine I wanted to do something like the following to push all of my leaves to the remote as backup:

jj git push -c 'all:heads(base::) & mine() ~ empty()'

But couldn't, because jj git push doesn't handle large revsets, even though it does handle multiple -c arguments, so I had to work out some pipe-to-xargs command instead.

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

@thoughtpolice thoughtpolice changed the title git: let jj git push --change handle large revsets cli: let jj git push --change handle large revsets Jun 19, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
cli/src/commands/git/push.rs Show resolved Hide resolved
cli/src/commands/git/push.rs Outdated Show resolved Hide resolved
@thoughtpolice thoughtpolice force-pushed the aseipp/push-wmpksqotllyz branch 3 times, most recently from 53771d6 to fedefeb Compare June 19, 2024 22:54
Copy link
Owner

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

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

Thanks!

cli/src/commands/git/push.rs Show resolved Hide resolved
cli/src/commands/git/push.rs Outdated Show resolved Hide resolved
@thoughtpolice thoughtpolice force-pushed the aseipp/push-wmpksqotllyz branch 2 times, most recently from 7840ffa to 25079a5 Compare June 20, 2024 00:08
The follow up diff will make `-c` accept large revsets, so it won't make any
sense to print out the original expression when multiple branches will be
created from it.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
In a repo of mine I wanted to do something like the following to push all of my
leaves to the remote as backup:

    jj git push -c 'all:heads(base::) & mine() ~ empty()'

But couldn't, because `jj git push` doesn't handle large revsets, even though
it does handle multiple `-c` arguments, so I had to work out some pipe-to-xargs
command instead.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
@thoughtpolice thoughtpolice merged commit 397e96f into main Jun 20, 2024
29 checks passed
@thoughtpolice thoughtpolice deleted the aseipp/push-wmpksqotllyz branch June 20, 2024 16:40
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.

None yet

2 participants