cgit

commit ddfaef6bb28e697491b25bff5a7b260d44ce6ccf

Author: John Keeping <john@keeping.me.uk>

ui-diff: add "stat only" diff type

This prints the diffstat but stops before printing (or generating) any
of the body of the diff.

No cgitrc option is added here so that we can wait to see how useful
this is before letting people set it as the default.

Suggested-by: Konstantin Ryabitsev <mricon@kernel.org>
Signed-off-by: John Keeping <john@keeping.me.uk>

 cgit.h | 2 +-
 ui-diff.c | 4 ++++


diff --git a/cgit.h b/cgit.h
index 0eb5ed5a4e6f10beeb4ce79519f78f08a15d2343..0c1585d34cdd4872f0ad5fc3d1cac8e01388ef02 100644
--- a/cgit.h
+++ b/cgit.h
@@ -53,7 +53,7 @@ typedef void (*filepair_fn)(struct diff_filepair *pair);
 typedef void (*linediff_fn)(char *line, int len);
 
 typedef enum {
-	DIFF_UNIFIED, DIFF_SSDIFF
+	DIFF_UNIFIED, DIFF_SSDIFF, DIFF_STATONLY
 } diff_type;
 
 typedef enum {




diff --git a/ui-diff.c b/ui-diff.c
index a4ade4dd2e032c215c24355f66fb7afd159cf55f..bf2ec57d33bfd18a476d36188816714d6cfd0d31 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -349,6 +349,7 @@ 	html("