Skip to content

Commit

Permalink
cli: add another tip to the "max snapshot size" error
Browse files Browse the repository at this point in the history
A helpful additional tip, suggested by Fynn Schmitt-Ulms.

Closes #3912.

Signed-off-by: Austin Seipp <[email protected]>
  • Loading branch information
thoughtpolice committed Jun 19, 2024
1 parent 31b8f07 commit d7e41fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/src/command_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ impl From<SnapshotError> for CommandError {
- Run `jj config set --repo snapshot.max-new-file-size {}`
This will increase the maximum file size allowed for new files, in this repository only.
- Run `jj --config-toml 'snapshot.max-new-file-size={}' st`
This will increase the maximum file size allowed for new files, for this command only.",
This will increase the maximum file size allowed for new files, for this command only.
- Run the command with `--ignore-working-copy`
This will ignore changes to the working copy that have not been previously snapshotted.",
size.0, size.0
))
}
Expand Down
4 changes: 4 additions & 0 deletions cli/tests/test_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ fn test_snapshot_large_file() {
This will increase the maximum file size allowed for new files, in this repository only.
- Run `jj --config-toml 'snapshot.max-new-file-size=13' st`
This will increase the maximum file size allowed for new files, for this command only.
- Run the command with `--ignore-working-copy`
This will ignore changes to the working copy that have not been previously snapshotted.
"###);

// test with a larger file using 'KB' human-readable syntax
Expand All @@ -50,5 +52,7 @@ fn test_snapshot_large_file() {
This will increase the maximum file size allowed for new files, in this repository only.
- Run `jj --config-toml 'snapshot.max-new-file-size=11264' st`
This will increase the maximum file size allowed for new files, for this command only.
- Run the command with `--ignore-working-copy`
This will ignore changes to the working copy that have not been previously snapshotted.
"###);
}

0 comments on commit d7e41fd

Please sign in to comment.