stagit

static git repository generator

git clone https://9o.is/git/stagit.git

commit e690225306da775a36966022466de0d51d5f6636
parent 39a44299d076982fa0728f189542b8a0d1759417
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 30 Apr 2016 12:00:33 +0200

optimization: suppress large diffs

the values are arbitrary, these can be tweaked later if needed.

Diffstat:
Mstagit.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/stagit.c b/stagit.c @@ -432,6 +432,14 @@ printshowfile(FILE *fp, struct commitinfo *ci) if (!ci->deltas) return; + if (ci->filecount > 1000 || + ci->ndeltas > 1000 || + ci->addcount > 100000 || + ci->delcount > 100000) { + fprintf(fp, "(diff is too large, output suppressed)"); + return; + } + /* diff stat */ fputs("<b>Diffstat:</b>\n<table>", fp); for (i = 0; i < ci->ndeltas; i++) {