mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 00:50:57 +00:00
cli: get author timestamp of description template in consistent way
There's a subtle difference. If the original commit was discardable, its author timestamp is updated by CommitBuilder.
This commit is contained in:
parent
49e5585130
commit
05b90390ae
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 <super.seeder@example.com> (2001-02-03 08:05:10)
|
||||
JJ: Author: Super Seeder <super.seeder@example.com> (2001-02-03 08:05:12)
|
||||
JJ: Committer: Test User <test.user@example.com> (2001-02-03 08:05:12)
|
||||
|
||||
JJ: 0 files changed, 0 insertions(+), 0 deletions(-)
|
||||
|
|
Loading…
Reference in a new issue