optimization: suppress large diffs
the values are arbitrary, these can be tweaked later if needed.
This commit is contained in:
parent
914880f31b
commit
7067223104
8
stagit.c
8
stagit.c
|
@ -432,6 +432,14 @@ printshowfile(FILE *fp, struct commitinfo *ci)
|
||||||
if (!ci->deltas)
|
if (!ci->deltas)
|
||||||
return;
|
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 */
|
/* diff stat */
|
||||||
fputs("<b>Diffstat:</b>\n<table>", fp);
|
fputs("<b>Diffstat:</b>\n<table>", fp);
|
||||||
for (i = 0; i < ci->ndeltas; i++) {
|
for (i = 0; i < ci->ndeltas; i++) {
|
||||||
|
|
Loading…
Reference in a new issue