commit dfcab68b1fe1b9def4ed722a2eef44f0338b2a87 from: Klemens Nanni date: Fri Nov 29 21:54:39 2019 UTC diff: Allow 0 context, use GOT_DIFF_MAX_CONTEXT commit - dc1edbfa7b55d670ad2e36df81a084cc8498085b commit + dfcab68b1fe1b9def4ed722a2eef44f0338b2a87 blob - 603a08dbce6fba185a792c4cb606fc4c9e482bce blob + 756eaa2ea3216dabe5aaf7080a2c652fdbfd0f74 --- got/got.c +++ got/got.c @@ -2267,7 +2267,8 @@ cmd_diff(int argc, char *argv[]) while ((ch = getopt(argc, argv, "C:r:sw")) != -1) { switch (ch) { case 'C': - diff_context = strtonum(optarg, 1, INT_MAX, &errstr); + diff_context = strtonum(optarg, 0, GOT_DIFF_MAX_CONTEXT, + &errstr); if (errstr != NULL) err(1, "-C option %s", errstr); break;