Code

[PATCH] Constness fix for pickaxe option.
authorJunio C Hamano <junkio@cox.net>
Sat, 21 May 2005 22:02:51 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 21 May 2005 22:17:16 +0000 (15:17 -0700)
Constness fix for pickaxe option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
diff-cache.c
diff-files.c
diff-helper.c
diff-tree.c
diff.c
diff.h

index b47b45a40d277a1211e56de0adfb6753ec34fb02..c604359401447e77244ad9b1938eb86bd4198e3a 100644 (file)
@@ -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)
index a3c523ff6feeae5d5200153012068ee05f91d836..6dca9e0e2b58728f4f13c899a513fbd3fb766808 100644 (file)
@@ -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)
index 568d5ae356c90177b376561c8b71c28b3c8d3f2f..3c39c96d7e854f784e2c2dd06182fd0ec6e586a6 100644 (file)
@@ -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)
index 868404f7c4003f162b16585f1e8db904b8ed4551..73aa1496e8d49606e6cd6ecd1d89c251ea293eba 100644 (file)
@@ -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 13d5e3edf4f8b7f4aa544fab34d0db5f843dd3d5..f7d4bc4b5aa479f6060e03e799aad76b9ad71d3d 100644 (file)
--- 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 97d39ac96175a5df191023697388f14c4f7e6c7c..7473c522846068b8e4ea3a4f4a62eba239b0e90e 100644 (file)
--- 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);