aboutsummaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2009-03-26 16:16:47 +0100
committerJunio C Hamano <gitster@pobox.com>2009-03-27 22:10:58 -0700
commitfb8b193670b0c11d118185332efc899d6d01d5f4 (patch)
tree1d25d46394067edd7833aeb70e714ebcbe6389c7 /http-walker.c
parent5a688fe4706462dfa0a7932ef0c82c335c47e9ab (diff)
downloadgit-fb8b193670b0c11d118185332efc899d6d01d5f4.tar.gz
git-fb8b193670b0c11d118185332efc899d6d01d5f4.tar.xz
Move chmod(foo, 0444) into move_temp_to_file()
When writing out a loose object or a pack (index), move_temp_to_file() is called to finalize the resulting file. These files (loose files and packs) should all have permission mode 0444 (modulo adjust_shared_perm()). Therefore, instead of doing chmod(foo, 0444) explicitly from each callsite (or even forgetting to chmod() at all), do the chmod() call from within move_temp_to_file(). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/http-walker.c b/http-walker.c
index 0dbad3c88..c5a3ea3b3 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -231,7 +231,6 @@ static void finish_object_request(struct object_request *obj_req)
{
struct stat st;
- fchmod(obj_req->local, 0444);
close(obj_req->local); obj_req->local = -1;
if (obj_req->http_code == 416) {