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: add --author argument for commit and describe #4466

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

mati865
Copy link
Contributor

@mati865 mati865 commented Sep 14, 2024

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

Fixes #4170

Copy link

google-cla bot commented Sep 14, 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.

@mati865 mati865 force-pushed the push-lrvkslplkslp branch 2 times, most recently from 3869282 to 01074ab Compare September 14, 2024 16:18
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

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

LGTM, it's only missing a UI test in cli/tests/test_describe.rs for the feature.

@mati865
Copy link
Contributor Author

mati865 commented Sep 14, 2024

Sorry, I've looked for these tests but couldn't find them previously. I'll update them (describe and commit) tomorrow.

Copy link
Contributor Author

@mati865 mati865 left a comment

Choose a reason for hiding this comment

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

The tests revealed a few issues that should be addressed now. I'll move value parsing to Clap and rebase the conflict later.

cli/src/commands/describe.rs Outdated Show resolved Hide resolved
cli/src/commands/describe.rs Outdated Show resolved Hide resolved
cli/src/description_util.rs Outdated Show resolved Hide resolved
@mati865 mati865 force-pushed the push-lrvkslplkslp branch 4 times, most recently from 3cbfd4e to 981b856 Compare September 17, 2024 00:04
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

cli/src/cli_util.rs Outdated Show resolved Hide resolved
cli/src/cli_util.rs Outdated Show resolved Hide resolved
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
cli/src/commands/describe.rs Outdated Show resolved Hide resolved
cli/tests/test_describe_command.rs Outdated Show resolved Hide resolved
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
cli/src/text_util.rs Outdated Show resolved Hide resolved
cli/src/commands/describe.rs Outdated Show resolved Hide resolved
cli/src/commands/commit.rs Outdated Show resolved Hide resolved
@mati865
Copy link
Contributor Author

mati865 commented Sep 22, 2024

Thank you for bearing with me through the whole process!
I'll consider how to refactor problematic code in describe.rs but probably not until next weekend.

@mati865 mati865 enabled auto-merge (rebase) September 22, 2024 08:59
@mati865 mati865 merged commit 2e9049b into jj-vcs:main Sep 22, 2024
18 checks passed
@mati865 mati865 deleted the push-lrvkslplkslp branch September 22, 2024 10:40
@mati865
Copy link
Contributor Author

mati865 commented Sep 29, 2024

I couldn't find the way to refactor it in a way that would improve it, felt like I'm only making things worse.

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.

FR: Equivalent to git commit's --author <id> option in jj {desc,commit}
3 participants