ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: label working copies when writing commit summaries

This commit is contained in:
Vamsi Avula 2023-09-07 10:18:04 +05:30
parent c4769e0b7c
commit ddb6e1b954
2 changed files with 9 additions and 4 deletions

View file

@ -1369,7 +1369,9 @@ See https://github.com/martinvonz/jj/blob/main/docs/working-copy.md#stale-workin
)?;
if Some(&new_commit) != maybe_old_commit {
ui.write("Working copy now at: ")?;
self.write_commit_summary(ui.stdout_formatter().as_mut(), &new_commit)?;
ui.stdout_formatter().with_label("working_copy", |fmt| {
self.write_commit_summary(fmt, &new_commit)
})?;
ui.write("\n")?;
for parent in new_commit.parents() {
// "Working copy now at: "

View file

@ -1598,7 +1598,9 @@ fn cmd_status(
}
formatter.write_str("Working copy : ")?;
workspace_command.write_commit_summary(formatter, wc_commit)?;
formatter.with_label("working_copy", |fmt| {
workspace_command.write_commit_summary(fmt, wc_commit)
})?;
formatter.write_str("\n")?;
for parent in wc_commit.parents() {
formatter.write_str("Parent commit: ")?;
@ -3822,8 +3824,9 @@ fn cmd_workspace_update_stale(
})?;
locked_wc.finish(repo.op_id().clone())?;
ui.write("Working copy now at: ")?;
workspace_command
.write_commit_summary(ui.stdout_formatter().as_mut(), &desired_wc_commit)?;
ui.stdout_formatter().with_label("working_copy", |fmt| {
workspace_command.write_commit_summary(fmt, &desired_wc_commit)
})?;
ui.write("\n")?;
print_checkout_stats(ui, stats)?;
}