diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-04-08 23:23:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-04-08 23:23:41 -0700 |
| commit | bff82d0cdaf29ec0f8b1f5f166100770c044388f (patch) | |
| tree | 331010d5c9192dbee7da020bf416cb4c304e1c93 /index-pack.c | |
| parent | 197cf8d59c0109f486ed6b56512b3c54ea44dccd (diff) | |
| parent | 1b89eaa4bef44ef84f2af611d5db8727e3be266c (diff) | |
| download | git-bff82d0cdaf29ec0f8b1f5f166100770c044388f.tar.gz | |
Merge branch 'jc/shared-literally' into maint
* 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 7fee872533..5dfe03ee6c 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)); |
