summaryrefslogtreecommitdiff
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-01-23 01:28:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-23 18:34:51 (GMT)
commitaa8bd519dbf044f4b54a365c9c80c6eb9a1ee2ea (patch)
tree381f0d2d71def96996367b6c2c71294a36449d78 /builtin/repack.c
parent44b96ecaa84b1de72a57e27143bf9aca75f251b9 (diff)
downloadgit-aa8bd519dbf044f4b54a365c9c80c6eb9a1ee2ea.zip
git-aa8bd519dbf044f4b54a365c9c80c6eb9a1ee2ea.tar.gz
git-aa8bd519dbf044f4b54a365c9c80c6eb9a1ee2ea.tar.bz2
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>
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 512a53a..3dbb0ed 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -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;