summaryrefslogtreecommitdiff
path: root/src/diff_stats.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-09-11 08:37:12 -0400
committerEdward Thomson <ethomson@github.com>2016-05-26 13:01:04 -0500
commit804d5fe9f59f4d8548da9f650bc43050951f26d7 (patch)
treedcb30d7b1721021d14731eb67a615d9c829f8833 /src/diff_stats.c
parent8d2eef27ffae3fe9cfbaa0c0c16655598b5b1d6b (diff)
downloadlibgit2-804d5fe9f59f4d8548da9f650bc43050951f26d7.tar.gz
patch: abstract patches into diff'ed and parsed
Patches can now come from a variety of sources - either internally generated (from diffing two commits) or as the results of parsing some external data.
Diffstat (limited to 'src/diff_stats.c')
-rw-r--r--src/diff_stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/diff_stats.c b/src/diff_stats.c
index 42ccbfb87..f2eb69680 100644
--- a/src/diff_stats.c
+++ b/src/diff_stats.c
@@ -7,7 +7,7 @@
#include "common.h"
#include "vector.h"
#include "diff.h"
-#include "diff_patch.h"
+#include "patch_diff.h"
#define DIFF_RENAME_FILE_SEPARATOR " => "
#define STATS_FULL_MIN_SCALE 7
@@ -190,8 +190,9 @@ int git_diff_get_stats(
break;
/* keep a count of renames because it will affect formatting */
- delta = git_patch_get_delta(patch);
+ delta = patch->delta;
+ /* TODO ugh */
namelen = strlen(delta->new_file.path);
if (strcmp(delta->old_file.path, delta->new_file.path) != 0) {
namelen += strlen(delta->old_file.path);