Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix Load-Order Bug#44

Merged
faceleg merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
fatlotus:masterfatlotus/nodegit:masterCopy head branch name to clipboard
Feb 28, 2013
Merged

Fix Load-Order Bug#44
faceleg merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
fatlotus:masterfatlotus/nodegit:masterCopy head branch name to clipboard

Conversation

@fatlotus
Copy link
Contributor

Hey guys-

To be honest, I'm not sure if this is a bug or not. I've found it inconvenient behavior in my own use, so I've changed it in my local fork. Currently, when a nested directory is iterated over, the 'end' event is only called when all the root entries have loaded, meaning that it is impossible to know when all sub-entries are complete.

This patch requires that all sub-queries load before the root directory is to load. (There's a line in here, "tree.error" that I'm not sure I understand — right now the "end" event will not fire if this the case.)

This code fixes a bug whereby some tree elements will not yet
have loaded when the 'end' event is signalled.
@faceleg
Copy link
Collaborator

faceleg commented Feb 27, 2013

HI @fatlotus, it seems logical that the end event should fire only when the full tree has been scanned. I've added a unit test that is currently failing, thus proving your observation. If you'd like to update your fork & run the tests to ensure your code causes it to pass, we can look at merging your PR.

@faceleg faceleg merged commit 3e0f15d into nodegit:master Feb 28, 2013
@faceleg
Copy link
Collaborator

faceleg commented Feb 28, 2013

Couldn't help it, I wrote the tests. Thanks for your contribution!

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.