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: move: Add -f/-t for --from/--to to jj move #3062

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

poliorcetics
Copy link
Contributor

I find myself often using jj move when working and having shorthands for --from/--to would be very useful

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 (modified existing one)

Copy link

google-cla bot commented Feb 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@arxanas
Copy link
Contributor

arxanas commented Feb 16, 2024

Be advised that -f may conflict with a future --force option, should we choose to add one in the future.

@thoughtpolice
Copy link
Member

thoughtpolice commented Feb 16, 2024

Be advised that -f may conflict with a future --force option, should we choose to add one in the future.

I almost wonder if we want to call them --source and --dest instead, to match what we do in jj rebase. -s and -d are relatively uncommon and it would be a little more "symmetrical." Then we would keep -f free. Just a thought.

@yuja
Copy link
Contributor

yuja commented Feb 16, 2024

This seems also related: #2882

@poliorcetics
Copy link
Contributor Author

I can rename to --source/--dest and associated shorthands if preferred

@martinvonz
Copy link
Member

I can rename to --source/--dest and associated shorthands if preferred

I think this PR is good as is. Whether we rename the flags seems like a separate discussion that shouldn't block this.

I almost wonder if we want to call them --source and --dest instead, to match what we do in jj rebase. -s and -d are relatively uncommon and it would be a little more "symmetrical." Then we would keep -f free. Just a thought.

--from and --to also seem very symmetrical, don't they? We also have jj diff to compare to, and -s/-d seem to make less sense there. That said, I'm not completely against naming these flags more in line with jj rebase than jj diff.

This seems also related: #2882

Yes.

@martinvonz
Copy link
Member

Be advised that -f may conflict with a future --force option, should we choose to add one in the future.

I generally avoid --force unless it's obvious what's being forced. I think there's usually a clearer name (--allow-conflicts or whatever is relevant). There may be several ways to force things in a single command.

@poliorcetics poliorcetics changed the title feat(cli): Add -f/-t for --from/--to to jj move cli: move: Add -f/-t for --from/--to to jj move Feb 18, 2024
@poliorcetics
Copy link
Contributor Author

Fixed the conflict in the changelog

@poliorcetics poliorcetics enabled auto-merge (rebase) February 18, 2024 17:53
@poliorcetics poliorcetics merged commit b533cdc into jj-vcs:main Feb 18, 2024
15 checks passed
@poliorcetics poliorcetics deleted the ab/push-smtoxquqvxsu branch February 18, 2024 17:59
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.

5 participants