Skip to content

Commit

Permalink
add Diff#toJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
sentientwaffle committed Feb 17, 2012
1 parent a2528a0 commit ff3161b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/diff.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ module.exports = class Diff
@a_blob = new Blob @repo, {id: a_blob} if a_blob
@b_blob = new Blob @repo, {id: b_blob} if b_blob


toJSON: ->
{@a_path, @b_path, @a_mode, @b_mode, @new_file
, @deleted_file, @diff, @renamed_file, @similarity_index}

# Public: Parse the Diffs from the command output.
#
# text - String stdout of a `git diff` command.
Expand Down

0 comments on commit ff3161b

Please sign in to comment.