Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

reduce git commands when get many commits info #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

reduce git commands when get many commits info #145

wants to merge 1 commit into from

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 16, 2019

No description provided.

@codecov-io
Copy link

codecov-io commented Feb 16, 2019

Codecov Report

Merging #145 into master will increase coverage by 0.04%.
The diff coverage is 68.42%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
commit_info.go 62.6% <68.42%> (+0.93%) ⬆️
repo_commit.go 23.77% <0%> (-1.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fa2b63...72226f7. Read the comment docs.

}
commit, err := state.headCommit.repo.getCommit(id)

commit, err := parseSimpleCommit(output)
Copy link
Member

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

Copy link
Member

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

Copy link
Member Author

@lunny lunny Feb 17, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants