fix: improve error messages and refactor large functions in save/diff modes

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-10 00:00:33 -03:00
parent 498f3e0b9d
commit 58f047ba6d
3 changed files with 354 additions and 225 deletions

View File

@@ -151,7 +151,7 @@ pub fn cmd_args_digest_type(cmd: &mut Command, args: &Args) -> MetaPluginType {
if digest_type_opt.is_err() {
cmd.error(
ErrorKind::InvalidValue,
format!("Unknown digest type: {}", digest_name),
format!("Invalid digest algorithm '{}'. Use 'sha256' or 'md5'", digest_name),
)
.exit();
}
@@ -170,7 +170,7 @@ pub fn cmd_args_compression_type(cmd: &mut Command, args: &Args) -> CompressionT
if compression_type_opt.is_err() {
cmd.error(
ErrorKind::InvalidValue,
format!("Unknown compression type: {}", compression_name),
format!("Invalid compression algorithm '{}'. Supported algorithms: lz4, gzip, xz, zstd", compression_name),
)
.exit();
}