Code

pack-objects: make generated packfile read-only
authorJunio C Hamano <junkio@cox.net>
Mon, 23 Apr 2007 02:00:16 +0000 (19:00 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 23 Apr 2007 02:00:16 +0000 (19:00 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-objects.c

index 34350bf322458da33adde0bbb6d96628c8f279f5..50fc37fa0f77876fd73558eab3751653cce2a27e 100644 (file)
@@ -1790,7 +1790,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
                mode_t mode = umask(0);
 
                umask(mode);
-               mode = 0666 & ~mode;
+               mode = 0444 & ~mode;
 
                write_index_file(last_obj_offset, object_list_sha1);
                snprintf(tmpname, sizeof(tmpname), "%s-%s.pack",