diff: provide more context to the consumer of the callbacks #652

Merged
merged 4 commits into from Apr 30, 2012

Conversation

Projects
None yet
3 participants
@nulltoken
Member

nulltoken commented Apr 29, 2012

Update the diff callbacks to provide some information related to the file change being processed and the range of the hunk, when applicable.

The need for this fix has been identified by @yorah while implementing the Diff API in LibGit2Sharp (cf . libgit2/libgit2sharp#136).

Additionally, I've added a tiny accessor git_buf_len() which I've always missed.
If you think it's inappropriate I'll gladly remove it from the PR and will keep on digging into the buffer code to find out if I'm supposed to use the sizeor asize property :-)

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Apr 29, 2012

This pull request passes (merged 4481f983 into 8b9ec20).

This pull request passes (merged 4481f983 into 8b9ec20).

@nulltoken

This comment has been minimized.

Show comment Hide comment
@nulltoken

nulltoken Apr 29, 2012

Member

@arrbee Does this patch reflect what you had in mind?

Member

nulltoken commented Apr 29, 2012

@arrbee Does this patch reflect what you had in mind?

nulltoken added some commits Apr 29, 2012

diff: provide more context to the consumer of the callbacks
Update the callback to provide some information related to the file change being processed and the range of the hunk, when applicable.
@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Apr 30, 2012

This pull request passes (merged fa6420f into 8b9ec20).

This pull request passes (merged fa6420f into 8b9ec20).

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Apr 30, 2012

This pull request passes (merged 2de0652 into 8b9ec20).

This pull request passes (merged 2de0652 into 8b9ec20).

@arrbee

This comment has been minimized.

Show comment Hide comment
@arrbee

arrbee Apr 30, 2012

Member

Looks great! :shipit:

Member

arrbee commented Apr 30, 2012

Looks great! :shipit:

arrbee added a commit that referenced this pull request Apr 30, 2012

Merge pull request #652 from nulltoken/topic/diff-callbacks
diff: provide more context to the consumer of the callbacks

@arrbee arrbee merged commit 0dc8e95 into libgit2:new-error-handling Apr 30, 2012

phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014

Merge pull request #652 from nulltoken/topic/diff-callbacks
diff: provide more context to the consumer of the callbacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment