reduce git commands when get many commits info#145
reduce git commands when get many commits info#145lunny wants to merge 1 commit intogo-gitea:masterfrom lunny:lunny/simple_get_commits
Conversation
Codecov Report
@@ Coverage Diff @@
## master #145 +/- ##
==========================================
+ Coverage 37.28% 37.33% +0.04%
==========================================
Files 28 28
Lines 1832 1843 +11
==========================================
+ Hits 683 688 +5
- Misses 1055 1059 +4
- Partials 94 96 +2
Continue to review full report at Codecov.
|
| } | ||
| commit, err := state.headCommit.repo.getCommit(id) | ||
|
|
||
| commit, err := parseSimpleCommit(output) |
There was a problem hiding this comment.
but repo.getCommit returns way more info about commit than this
There was a problem hiding this comment.
That gives too much info than we need and would need another cli call which would add too much overhead
There was a problem hiding this comment.
Yes. But this function only be used on showing repo homepage. On that page, we only need entryPath, last commit's commitid, commit message and commit time. So other information will spend many time but unnecessary. Maybe I should define a new struct to only include that messages.
No description provided.