diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-21 00:00:47 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-24 23:50:43 -0700 |
commit | 6b5ee137e56af8093391411389dd4b18416707ec (patch) | |
tree | ca7f7ea853bc836e1b41a52301884f3d41708c2a /update-index.c | |
parent | dbc37438687e110697574d175e4eca5f9cbeae81 (diff) | |
download | git-6b5ee137e56af8093391411389dd4b18416707ec.tar.gz git-6b5ee137e56af8093391411389dd4b18416707ec.tar.xz |
Diff clean-up.
This is a long overdue clean-up to the code for parsing and passing
diff options. It also tightens some constness issues.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'update-index.c')
-rw-r--r-- | update-index.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/update-index.c b/update-index.c index cb0265bdf..1ea36ea4d 100644 --- a/update-index.c +++ b/update-index.c @@ -31,7 +31,7 @@ static inline long IS_ERR(const void *ptr) return (unsigned long)ptr > (unsigned long)-1000L; } -static int add_file_to_cache(char *path) +static int add_file_to_cache(const char *path) { int size, namelen, option, status; struct cache_entry *ce; @@ -221,7 +221,7 @@ static int verify_dotfile(const char *rest) return 1; } -static int verify_path(char *path) +static int verify_path(const char *path) { char c; @@ -247,7 +247,7 @@ inside: } } -static int add_cacheinfo(char *arg1, char *arg2, char *arg3) +static int add_cacheinfo(const char *arg1, const char *arg2, const char *arg3) { int size, len, option; unsigned int mode; @@ -277,7 +277,7 @@ static int add_cacheinfo(char *arg1, char *arg2, char *arg3) static struct cache_file cache_file; -int main(int argc, char **argv) +int main(int argc, const char **argv) { int i, newfd, entries, has_errors = 0; int allow_options = 1; @@ -292,7 +292,7 @@ int main(int argc, char **argv) die("cache corrupted"); for (i = 1 ; i < argc; i++) { - char *path = argv[i]; + const char *path = argv[i]; if (allow_options && *path == '-') { if (!strcmp(path, "--")) { |