From 56f94e51926de7b52292b30cf913507f16838dd6 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 23 Nov 2022 23:46:04 -0800 Subject: [PATCH] cli: record program name in operation metadata as exactly "jj" This is a simple workaround to make operation IDs predictable (so they don't include the path to `.../target/debug/jj` or similar). The full path can probably be useful for troubleshooting, but we can deal with that later if we see a need for it. It might also be less confusing for Windows users if it says "jj.exe". --- src/cli_util.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli_util.rs b/src/cli_util.rs index c8d39bcb2..fd439c331 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -815,7 +815,8 @@ impl WorkspaceCommandHelper { format!("'{}'", arg.replace('\'', "\\'")) } }; - let quoted_strings = self.string_args.iter().map(shell_escape).collect_vec(); + let mut quoted_strings = vec!["jj".to_string()]; + quoted_strings.extend(self.string_args.iter().skip(1).map(shell_escape)); tx.set_tag("args".to_string(), quoted_strings.join(" ")); tx }