功能补齐、查看git提交历史

This commit is contained in:
2026-06-12 09:21:37 +08:00
parent fba3a14367
commit 2a9661a6ef
12 changed files with 329 additions and 9 deletions
+12
View File
@@ -119,3 +119,15 @@ type commitResp struct {
type branchListResp struct {
Branches []string `json:"branches"`
}
type commitLogResp struct {
Hash string `json:"hash"`
Author string `json:"author"`
Email string `json:"email"`
Date time.Time `json:"date"`
Subject string `json:"subject"`
}
func toCommitLogResp(c git.Commit) commitLogResp {
return commitLogResp{Hash: c.Hash, Author: c.Author, Email: c.Email, Date: c.Date, Subject: c.Subject}
}