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: skip formatting instructions if not required #4052

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

scott2000
Copy link
Collaborator

Suggested in #4046.

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

@scott2000 scott2000 requested a review from yuja July 9, 2024 02:11
@scott2000 scott2000 force-pushed the lazy-format-instructions branch from 1d07943 to 956d1ef Compare July 9, 2024 02:47
Copy link
Collaborator

@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.

Thanks for adding tests.

cli/src/cli_util.rs Outdated Show resolved Hide resolved
`tx.format_commit_summary()` can be expensive because it needs to build
an IdPrefixContext now, so it's best to avoid formatting instruction
messages unless they are actually required.
@scott2000 scott2000 force-pushed the lazy-format-instructions branch from 956d1ef to 50b375d Compare July 9, 2024 23:10
@scott2000 scott2000 merged commit b27ff28 into jj-vcs:main Jul 10, 2024
17 checks passed
@scott2000 scott2000 deleted the lazy-format-instructions branch July 10, 2024 01:24
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.

2 participants