summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-03-16 20:35:00 +0700
committerJunio C Hamano <gitster@pobox.com>2014-03-31 10:31:43 -0700
commit8640d496823b0aa1d35523b98d8b3f21b54004cd (patch)
tree5cfda993d188cbb4a9818acdb79af2e7930fd304
parent125f81461db82e29d03fa788e4a897e6ab7d1ded (diff)
downloadgit-8640d496823b0aa1d35523b98d8b3f21b54004cd.tar.gz
environment.c: fix constness for odb_pack_keep()nd/gc-aggressive
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--environment.c2
-rw-r--r--git-compat-util.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/environment.c b/environment.c
index c3c860603d..5c4815dbe1 100644
--- a/environment.c
+++ b/environment.c
@@ -237,7 +237,7 @@ int odb_mkstemp(char *template, size_t limit, const char *pattern)
return xmkstemp_mode(template, mode);
}
-int odb_pack_keep(char *name, size_t namesz, unsigned char *sha1)
+int odb_pack_keep(char *name, size_t namesz, const unsigned char *sha1)
{
int fd;
diff --git a/git-compat-util.h b/git-compat-util.h
index 585ef8a79b..adbfb5e42f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -533,7 +533,7 @@ extern FILE *xfdopen(int fd, const char *mode);
extern int xmkstemp(char *template);
extern int xmkstemp_mode(char *template, int mode);
extern int odb_mkstemp(char *template, size_t limit, const char *pattern);
-extern int odb_pack_keep(char *name, size_t namesz, unsigned char *sha1);
+extern int odb_pack_keep(char *name, size_t namesz, const unsigned char *sha1);
static inline size_t xsize_t(off_t len)
{