Skip to content

Commit a69dc06

Browse files
refactor(utils): 更新 commit 统计信息打印格式
- 调整了 Commit 信息的打印格式,增加了 hash 值的输出 - 优化了输出顺序,更符合逻辑顺序
1 parent d037337 commit a69dc06

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ pub fn print_commit_stats(commit_stats: Vec<Commit>) {
8989

9090
for commit in commit_stats {
9191
println!(
92-
"Commit {}: {}, {} insertions(+), {} deletions(-),{} files changed",
92+
"Commit {}:, {} insertions(+), {} deletions(-),{} files changed , hash: {}",
9393
commit.commit_msg,
94-
commit.commit_hash,
9594
commit.added,
9695
commit.deleted,
9796
commit.files_changed,
97+
commit.commit_hash,
9898
);
9999

100100
total_added += commit.added;

todolist.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [ ] hash 可根据参数隐藏
2+
- [ ] 支持打印作者,可根据参数隐藏
3+
- [ ] 可打印长短哈希,可根据参数隐藏
4+
- [ ] 可打印提交日期&时间,可根据参数隐藏

0 commit comments

Comments
 (0)