summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@linux-foundation.org>2010-01-22 07:55:19 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-22 10:10:27 -0800
commit3bb7256281bb1d291bb705a57dc3f30b26b7c127 (patch)
tree7d0fb7bf88cabcd5c7b17a0f687f359737c6ce2d /builtin-pack-objects.c
parentmake "git pack-redundant" a built-in (diff)
downloadtgif-3bb7256281bb1d291bb705a57dc3f30b26b7c127.tar.xz
make "index-pack" a built-in
This required some fairly trivial packfile function 'const' cleanup, since the builtin commands get a const char *argv[] array. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 59b07fe491..b0887d759d 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -525,7 +525,8 @@ static void write_pack_file(void)
if (!pack_to_stdout) {
mode_t mode = umask(0);
struct stat st;
- char *idx_tmp_name, tmpname[PATH_MAX];
+ const char *idx_tmp_name;
+ char tmpname[PATH_MAX];
umask(mode);
mode = 0444 & ~mode;
@@ -569,7 +570,7 @@ static void write_pack_file(void)
if (rename(idx_tmp_name, tmpname))
die_errno("unable to rename temporary index file");
- free(idx_tmp_name);
+ free((void *) idx_tmp_name);
free(pack_tmp_name);
puts(sha1_to_hex(sha1));
}