Skip to content

Commit 4ebf1a9

Browse files
committed
josh-sync: Also show the commit timestamp
1 parent ed17b95 commit 4ebf1a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/josh-sync/src/sync.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ impl GitSync {
8181
]);
8282
let new_summary = check_output(["git", "log", "-1", "--format=%h %s", &new_upstream_base]);
8383
let new_summary = replace_references(&new_summary, &self.upstream_repo);
84+
let new_timestamp = check_output_cfg("git", |c| {
85+
c.env("TZ", "UTC")
86+
.args(["log", "-1", "--format=%cd", "--date=iso-local"])
87+
});
8488

8589
// Update rust-version file. As a separate commit, since making it part of
8690
// the merge has confused the heck out of josh in the past.
@@ -93,7 +97,8 @@ impl GitSync {
9397
let prep_message = format!(
9498
"Update the upstream Rust version\n\n\
9599
To prepare for merging from {upstream_repo}, set the version file to:\n\n \
96-
{new_summary}\n\
100+
{new_summary}\n\n\
101+
(committed at {new_timestamp})\n\
97102
",
98103
);
99104
run([

0 commit comments

Comments
 (0)