Skip to content

Fixed example walk-history-for-file.js#847

Merged
johnhaley81 merged 1 commit intonodegit:masterfrom
pevers:master
Jan 5, 2016
Merged

Fixed example walk-history-for-file.js#847
johnhaley81 merged 1 commit intonodegit:masterfrom
pevers:master

Conversation

@pevers
Copy link
Copy Markdown
Contributor

@pevers pevers commented Jan 3, 2016

The walk-history-for-file.js example was broken so I fixed it with some minor changes. The reason it broke is that diff.patches() returns a promise and not an array that can be reduced. I made the example a little bit less efficient (checking for an already present commit) but I think it is a little bit more readable. The screenshot shows a comparison of git log and the example. Note that it is not a 1-1 mapping because git log is a little bit more intelligent.

output of git log descriptor.js
selection_005
output of walk-history-for-file.js
selection_006

@johnhaley81
Copy link
Copy Markdown
Collaborator

Thanks for the PR @pevers!

johnhaley81 added a commit that referenced this pull request Jan 5, 2016
Fixed example walk-history-for-file.js
@johnhaley81 johnhaley81 merged commit 03496d8 into nodegit:master Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants