diff options
author | Junio C Hamano <junkio@cox.net> | 2006-06-05 22:36:21 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-05 22:36:21 -0700 |
commit | 16cee38ae2bff93a4e4c512550fb4ccac035a3a1 (patch) | |
tree | 854ffe8d8223caaf08bd4881ba384b576bcc031a /builtin-rev-parse.c | |
parent | 1d84a60459a32fb1707ff7de4a013b5d9673f55d (diff) | |
download | git-16cee38ae2bff93a4e4c512550fb4ccac035a3a1.tar.gz |
rev-parse: tighten constness properly.v1.4.0-rc1
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-rev-parse.c')
-rw-r--r-- | builtin-rev-parse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c index c353a481b0..b27a6d382b 100644 --- a/builtin-rev-parse.c +++ b/builtin-rev-parse.c @@ -15,7 +15,7 @@ #define DO_NONFLAGS 8 static int filter = ~0; -static char *def = NULL; +static const char *def = NULL; #define NORMAL 0 #define REVERSED 1 @@ -111,7 +111,7 @@ static void show_rev(int type, const unsigned char *sha1, const char *name) } /* Output a flag, only if filter allows it. */ -static int show_flag(char *arg) +static int show_flag(const char *arg) { if (!(filter & DO_FLAGS)) return 0; @@ -124,7 +124,7 @@ static int show_flag(char *arg) static void show_default(void) { - char *s = def; + const char *s = def; if (s) { unsigned char sha1[20]; @@ -173,7 +173,7 @@ int cmd_rev_parse(int argc, const char **argv, char **envp) git_config(git_default_config); for (i = 1; i < argc; i++) { - char *arg = argv[i]; + const char *arg = argv[i]; char *dotdot; if (as_is) { @@ -330,7 +330,7 @@ int cmd_rev_parse(int argc, const char **argv, char **envp) if (dotdot) { unsigned char end[20]; char *next = dotdot + 2; - char *this = arg; + const char *this = arg; *dotdot = 0; if (!*next) next = "HEAD"; |