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: Fix error message grammar and associated tests #4975

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/src/command_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl From<SnapshotError> for CommandError {
err_str,
))
.hinted(format!(
"This is to prevent large files from being added on accident. You can fix \
"This is to prevent large files from being added by accident. You can fix \
this error by:
- Adding the file to `.gitignore`
- Run `jj config set --repo snapshot.max-new-file-size {}`
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/test_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn test_snapshot_large_file() {
insta::assert_snapshot!(stderr, @r###"
Error: Failed to snapshot the working copy
The file '$TEST_ENV/repo/large' is too large to be snapshotted: it is 3 bytes too large; the maximum size allowed is 10 bytes (10.0B).
Hint: This is to prevent large files from being added on accident. You can fix this error by:
Hint: This is to prevent large files from being added by accident. You can fix this error by:
- Adding the file to `.gitignore`
- Run `jj config set --repo snapshot.max-new-file-size 13`
This will increase the maximum file size allowed for new files, in this repository only.
Expand All @@ -46,7 +46,7 @@ fn test_snapshot_large_file() {
insta::assert_snapshot!(stderr, @r###"
Error: Failed to snapshot the working copy
The file '$TEST_ENV/repo/large' is too large to be snapshotted: it is 1024 bytes too large; the maximum size allowed is 10240 bytes (10.0KiB).
Hint: This is to prevent large files from being added on accident. You can fix this error by:
Hint: This is to prevent large files from being added by accident. You can fix this error by:
- Adding the file to `.gitignore`
- Run `jj config set --repo snapshot.max-new-file-size 11264`
This will increase the maximum file size allowed for new files, in this repository only.
Expand Down