Skip to content

Status.byIndex and StatusEntry#448

Merged
orderedlist merged 4 commits intomasterfrom
ol-status-with-delta
Mar 2, 2015
Merged

Status.byIndex and StatusEntry#448
orderedlist merged 4 commits intomasterfrom
ol-status-with-delta

Conversation

@orderedlist
Copy link
Copy Markdown
Collaborator

Getting this started, but something weird is going on with the deltas.

1) StatusList gets status with deltas:
     AssertionError: "���\u000f\u0013\u0017" == "my-new-file-that-shouldnt-exist.file"
      at /Users/steve/github/nodegit/test/tests/status_list.js:46:18
      at /Users/steve/github/nodegit/node_modules/nodegit-promise/lib/core.js:64:15
      at flush (/Users/steve/github/nodegit/node_modules/nodegit-promise/node_modules/asap/asap.js:27:13)
      at process._tickCallback (node.js:419:13)

@orderedlist
Copy link
Copy Markdown
Collaborator Author

Ok, I'm happy with this current implementation. StatusEntries get more context than the statuses we get from Status.forEach. With the latter, we only get a status bit and a path. With the StatusEntry we get not only the status bit, but the deltas from head-to-index and index-to-workdir, including old and new file info. This makes identifying renames possible, along with lots of other stuff.

I was thinking we might want to add a convenience method like Repository.getExtendedStatuses to grab this info. Does that sound good?

@johnhaley81
Copy link
Copy Markdown
Collaborator

Sound great, do it up.

On Mon, Mar 2, 2015, 7:24 AM Steve Smith notifications@github.com wrote:

Ok, I'm happy with this current implementation. StatusEntries get more
context than the statuses we get from Status.forEach. With the latter, we
only get a status bit and a path. With the StatusEntry we get not only the
status bit, but the deltas from head-to-index and index-to-workdir,
including old and new file info. This makes identifying renames possible,
along with lots of other stuff.

I was thinking we might want to add a convenience method like
Repository.getExtendedStatuses to grab this info. Does that sound good?


Reply to this email directly or view it on GitHub
#448 (comment).

@orderedlist
Copy link
Copy Markdown
Collaborator Author

Convenience method added as Repository.getStatusExt. I'll wait for a plus-one before merging.

@orderedlist orderedlist force-pushed the ol-status-with-delta branch from d3a9214 to 4947ecf Compare March 2, 2015 15:31
@johnhaley81
Copy link
Copy Markdown
Collaborator

👍

orderedlist added a commit that referenced this pull request Mar 2, 2015
@orderedlist orderedlist merged commit 617e74e into master Mar 2, 2015
@orderedlist orderedlist deleted the ol-status-with-delta branch March 2, 2015 15:39
@tbranyen tbranyen modified the milestone: 0.3.0 Mar 2, 2015
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.

3 participants