Skip to content
This repository was archived by the owner on Mar 4, 2021. It is now read-only.

feat(commits): list commits since a commitish#2

Merged
sidvishnoi merged 6 commits intomasterfrom
commits
Oct 14, 2019
Merged

feat(commits): list commits since a commitish#2
sidvishnoi merged 6 commits intomasterfrom
commits

Conversation

@sidvishnoi
Copy link
Owner

@sidvishnoi sidvishnoi commented Oct 11, 2019

For https://github.com/w3c/respec/issues/1724

The commits are listed in same order as regular git log.

How the caching works? Without the cache, we get the since (date) for given commitish.
After fetching once, we set the since to the date of current HEAD. With cache, we start the search from the new since date, instead of from ref's.

Caching benefits (fetching last 504 commits from a repository):

➜  node commits.js
Failed to load cache: gh/commits.
# timestamp   # of records fetched
1570788384931 100
1570788386215 100
1570788387373 100
1570788388495 100
1570788389544 100
1570788390002 4

➜  node commits.js
1570788394641 504
1570788395097 0

@sidvishnoi sidvishnoi marked this pull request as ready for review October 11, 2019 10:28
Copy link
Collaborator

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@sidvishnoi sidvishnoi merged commit 09038c8 into master Oct 14, 2019
@sidvishnoi sidvishnoi deleted the commits branch October 14, 2019 08:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants