1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 09:06:35 +02:00

repack: make parsed string options const-correct

When we use OPT_STRING to parse an option, we get back a
pointer into the argv array, which should be "const char *".
The compiler doesn't notice because it gets passed through a
"void *" in the option struct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2014-01-22 20:28:30 -05:00 committed by Junio C Hamano
parent 44b96ecaa8
commit aa8bd519db

View File

@ -129,7 +129,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
/* variables to be filled by option parsing */
int pack_everything = 0;
int delete_redundant = 0;
char *unpack_unreachable = NULL;
const char *unpack_unreachable = NULL;
int window = 0, window_memory = 0;
int depth = 0;
int max_pack_size = 0;