FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed example walk-history-for-file.js by pevers · Pull Request #847 · nodegit/nodegit · GitHub

Repository navigation

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

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

johnhaley81 merged 1 commit into
nodegit:masterfrom
pevers:master

Conversation

pevers commented Jan 3, 2016

Copy link
Copy Markdown
Contributor

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

output of walk-history-for-file.js

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 merged commit 03496d8 into nodegit:master Jan 5, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL