]> git.ipfire.org Git - thirdparty/git.git/commitdiff
entry.c: Use const qualifier for 'struct checkout' parameters
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Wed, 25 Apr 2007 14:18:08 +0000 (11:18 -0300)
committerJunio C Hamano <junkio@cox.net>
Wed, 25 Apr 2007 20:15:59 +0000 (13:15 -0700)
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h
entry.c

diff --git a/cache.h b/cache.h
index f05b67ad45630986a610cb86f4bfeb4bd535bad1..38a0cbd580a8497b18881548f7995bcfe97666af 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -409,7 +409,7 @@ struct checkout {
                 refresh_cache:1;
 };
 
-extern int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath);
+extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);
 
 extern struct alternate_object_database {
        struct alternate_object_database *next;
diff --git a/entry.c b/entry.c
index b51addbf8d0c766c1800dc5814ce50c35321143e..82bf7259a7d1d34a92a9bf214bccd9771748c582 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -1,7 +1,7 @@
 #include "cache.h"
 #include "blob.h"
 
-static void create_directories(const char *path, struct checkout *state)
+static void create_directories(const char *path, const struct checkout *state)
 {
        int len = strlen(path);
        char *buf = xmalloc(len + 1);
@@ -75,7 +75,7 @@ static void *read_blob_entry(struct cache_entry *ce, const char *path, unsigned
        return NULL;
 }
 
-static int write_entry(struct cache_entry *ce, char *path, struct checkout *state, int to_tempfile)
+static int write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)
 {
        int fd;
        long wrote;
@@ -163,7 +163,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
        return 0;
 }
 
-int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath)
+int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath)
 {
        static char path[PATH_MAX + 1];
        struct stat st;