1
0
mirror of https://github.com/danog/gift.git synced 2024-11-30 04:19:37 +01:00

add Diff#toJSON

This commit is contained in:
sentientwaffle 2012-02-17 07:51:12 -07:00
parent a2528a09e4
commit ff3161b6fd

View File

@ -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.