-
Notifications
You must be signed in to change notification settings - Fork 42
reduce git commands when get many commits info #145
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but repo.getCommit
returns way more info about commit than this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.