From ff3161b6fd973333a7a8315d853154cd91510ad0 Mon Sep 17 00:00:00 2001 From: sentientwaffle Date: Fri, 17 Feb 2012 07:51:12 -0700 Subject: [PATCH] add Diff#toJSON --- src/diff.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/diff.coffee b/src/diff.coffee index 0b02fe8..96a969f 100644 --- a/src/diff.coffee +++ b/src/diff.coffee @@ -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.