Merge branch 'js/commit-gpgsign' of ../git-gui into js/git-gui-commit-gpgsign
[gitweb.git] / parse-options.c
index 47a91920601d74842a0947ce1431c00b3d723972..312a85dbdef5723ef805917f5a556b75a55a7041 100644 (file)
@@ -110,6 +110,8 @@ static int get_value(struct parse_opt_ctx_t *p,
                return 0;
 
        case OPTION_COUNTUP:
+               if (*(int *)opt->value < 0)
+                       *(int *)opt->value = 0;
                *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1;
                return 0;