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:
parent
a2528a09e4
commit
ff3161b6fd
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user