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".
This commit is contained in:
Martin von Zweigbergk 2022-11-23 23:46:04 -08:00 committed by Martin von Zweigbergk
parent 802e21bf25
commit 56f94e5192

View file

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