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

squash: add -f/-t shorthands for --from/--[in]to #4612

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

avamsi
Copy link
Member

@avamsi avamsi commented Oct 9, 2024

I use these frequently and would like to type less :)

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

@avamsi avamsi force-pushed the av/jj_ukxpskuuynos branch from a1c9a8c to 6600740 Compare October 9, 2024 11:32
@arxanas
Copy link
Contributor

arxanas commented Oct 9, 2024

Generally, I prefer to leave -f to mean --force, so I'm not personally a fan of using -f for normal operations. (Not sure if we currently use -f elsewhere in jj or not?)

@avamsi
Copy link
Member Author

avamsi commented Oct 9, 2024

move (which is deprecated in favor of squash) supports -f/-t shorthands for --from/--to.

I see your point but I don't believe jj has any commands that support --force, so maybe it's okay? But then again, --force is common enough that it'll probably creep in somewhere or the other eventually.

@avamsi
Copy link
Member Author

avamsi commented Oct 9, 2024

-s/-d are probably decent alternatives (but could be confusing if we don't change --from/--to) -- that is, if there's enough interest in adding shorthands in the first place.

@yuja
Copy link
Contributor

yuja commented Oct 9, 2024

Generally, I prefer to leave -f to mean --force, so I'm not personally a fan of using -f for normal operations.

Even if we add --force-<something>, I assume we wouldn't add the short form for it. My only concern is that -f looks like --force.

@arxanas
Copy link
Contributor

arxanas commented Oct 9, 2024

I don't mean to block this PR on that issue. I'll leave it to someone else to accept/reject as appropriate.

@avamsi if you're just copying the short forms from an existing command, can you add that to the commit message?

@avamsi avamsi force-pushed the av/jj_ukxpskuuynos branch from 6600740 to 939ba53 Compare October 9, 2024 15:53
move already supports these, so this improves squash's parity (I believe
squash is strictly a superset now) as we inch towards deleting move.

Change-Id: Id00000005f2a7f551cb7a0aa598c6265091a32d1
@avamsi avamsi force-pushed the av/jj_ukxpskuuynos branch from 939ba53 to 848a675 Compare October 12, 2024 09:35
@martinvonz
Copy link
Member

I'm also hesitant about the -f but it sounds like most people are still okay with it. So let's merge this?

@avamsi avamsi merged commit 93a4fcf into jj-vcs:main Oct 13, 2024
18 checks passed
@avamsi avamsi deleted the av/jj_ukxpskuuynos branch October 13, 2024 02:34
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.

4 participants