Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of Commit#parent #1509

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

tniessen
Copy link
Contributor

@tniessen tniessen commented Jun 6, 2018

Commit#parent did not assign the repo property so subsequent calls which relied on this property (such as Commit#getTree) failed. This change works around this problem by imitating what LookupWrapper does for Commit.lookup, that is, it wraps the actual call in a new function and manually assigns the repo property.

This commit also adds a test case for the corrected behavior.

@tniessen
Copy link
Contributor Author

Ping @tbranyen, @johnhaley81, @maxkorp.

lib/commit.js Outdated Show resolved Hide resolved
@tniessen
Copy link
Contributor Author

@implausible Sorry for the late reply. Is the new commit better?

@tniessen
Copy link
Contributor Author

Ping @implausible, it's been far more than a year, is this still a helpful PR? If not, please close it.

Commit#parent did not assign the repo property so subsequent calls which
relied on this property (such as Commit#getTree) failed. This change
works around this problem by imitating what LookupWrapper does for
Commit.lookup, that is, it wraps the actual call in a new function and
manually assigns the repo property.
@tniessen tniessen force-pushed the fix-commit-parent-no-repo-prop branch from a84df76 to e3bb744 Compare January 19, 2020 19:01
@tbranyen tbranyen dismissed implausible’s stale review January 19, 2020 23:33

It has been resolved

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