Skip to content

Commit

Permalink
cli: get author timestamp of description template in consistent way
Browse files Browse the repository at this point in the history
There's a subtle difference. If the original commit was discardable, its author
timestamp is updated by CommitBuilder.
  • Loading branch information
yuja committed Sep 23, 2024
1 parent 49e5585 commit 05b9039
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub(crate) fn cmd_describe(
let new_author = Signature {
name,
email,
timestamp: commit.author().timestamp,
timestamp: commit_builder.author().timestamp,
};
commit_builder.set_author(new_author);
}
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/test_describe_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ fn test_describe_author() {
insta::assert_snapshot!(
std::fs::read_to_string(test_env.env_root().join("editor")).unwrap(), @r#"
JJ: Author: Super Seeder <[email protected]> (2001-02-03 08:05:10)
JJ: Author: Super Seeder <[email protected]> (2001-02-03 08:05:12)
JJ: Committer: Test User <[email protected]> (2001-02-03 08:05:12)
JJ: 0 files changed, 0 insertions(+), 0 deletions(-)
Expand Down

0 comments on commit 05b9039

Please sign in to comment.