diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-06 00:42:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-06 00:42:52 -0700 |
commit | 03a39a91842cf745e5fc27dbd6485aad44d839a4 (patch) | |
tree | d4536e303954fc52c189fc3140c46810e9832766 /index-pack.c | |
parent | ccc852c37751c7bc8f81bfb71e6722291270bca5 (diff) | |
parent | 1b89eaa4bef44ef84f2af611d5db8727e3be266c (diff) | |
download | git-03a39a91842cf745e5fc27dbd6485aad44d839a4.tar.gz |
Merge branch 'jc/shared-literally'
* jc/shared-literally:
t1301: loosen test for forced modes
set_shared_perm(): sometimes we know what the final mode bits should look like
move_temp_to_file(): do not forget to chmod() in "Coda hack" codepath
Move chmod(foo, 0444) into move_temp_to_file()
"core.sharedrepository = 0mode" should set, not loosen
Diffstat (limited to 'index-pack.c')
-rw-r--r-- | index-pack.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/index-pack.c b/index-pack.c index 75468228d3..6e93ee6af6 100644 --- a/index-pack.c +++ b/index-pack.c @@ -823,8 +823,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name, } if (move_temp_to_file(curr_pack_name, final_pack_name)) die("cannot store pack file"); - } - if (from_stdin) + } else if (from_stdin) chmod(final_pack_name, 0444); if (final_index_name != curr_index_name) { @@ -835,8 +834,8 @@ static void final(const char *final_pack_name, const char *curr_pack_name, } if (move_temp_to_file(curr_index_name, final_index_name)) die("cannot store index file"); - } - chmod(final_index_name, 0444); + } else + chmod(final_index_name, 0444); if (!from_stdin) { printf("%s\n", sha1_to_hex(sha1)); |