From: Junio C Hamano Date: Sat, 21 May 2005 22:02:51 +0000 (-0700) Subject: [PATCH] Constness fix for pickaxe option. X-Git-Tag: v0.99~511 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=057c7d30183672d6ef96a9f3e87860058e1c08f8;p=git.git [PATCH] Constness fix for pickaxe option. Constness fix for pickaxe option. Signed-off-by: Junio C Hamano --- diff --git a/diff-cache.c b/diff-cache.c index b47b45a4..c6043594 100644 --- a/diff-cache.c +++ b/diff-cache.c @@ -8,7 +8,7 @@ static int line_termination = '\n'; static int detect_rename = 0; static int reverse_diff = 0; static int diff_score_opt = 0; -static char *pickaxe = 0; +static const char *pickaxe = NULL; /* A file entry went away or appeared */ static void show_file(const char *prefix, struct cache_entry *ce, unsigned char *sha1, unsigned int mode) diff --git a/diff-files.c b/diff-files.c index a3c523ff..6dca9e0e 100644 --- a/diff-files.c +++ b/diff-files.c @@ -14,7 +14,7 @@ static int line_termination = '\n'; static int detect_rename = 0; static int reverse_diff = 0; static int diff_score_opt = 0; -static char *pickaxe = 0; +static const char *pickaxe = NULL; static int silent = 0; static int matches_pathspec(struct cache_entry *ce, char **spec, int cnt) diff --git a/diff-helper.c b/diff-helper.c index 568d5ae3..3c39c96d 100644 --- a/diff-helper.c +++ b/diff-helper.c @@ -9,7 +9,7 @@ static int detect_rename = 0; static int diff_score_opt = 0; static int generate_patch = 1; -static char *pickaxe = 0; +static const char *pickaxe = NULL; static int parse_oneside_change(const char *cp, int *mode, unsigned char *sha1, char *path) diff --git a/diff-tree.c b/diff-tree.c index 868404f7..73aa1496 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -13,7 +13,7 @@ static int generate_patch = 0; static int detect_rename = 0; static int reverse_diff = 0; static int diff_score_opt = 0; -static char *pickaxe = 0; +static const char *pickaxe = NULL; static const char *header = NULL; static const char *header_prefix = ""; diff --git a/diff.c b/diff.c index 13d5e3ed..f7d4bc4b 100644 --- a/diff.c +++ b/diff.c @@ -513,7 +513,7 @@ int diff_scoreopt_parse(const char *opt) } void diff_setup(int detect_rename_, int minimum_score_, - char *pickaxe_, + const char *pickaxe_, int reverse_diff_, int diff_raw_output_, const char **pathspec_, int speccnt_) { diff --git a/diff.h b/diff.h index 97d39ac9..7473c522 100644 --- a/diff.h +++ b/diff.h @@ -20,7 +20,7 @@ extern void diff_unmerge(const char *path); extern int diff_scoreopt_parse(const char *opt); extern void diff_setup(int detect_rename, int minimum_score, - char *pickaxe, + const char *pickaxe, int reverse, int raw_output, const char **spec, int cnt);