Re: [PATCH 3/6] git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 20, 2010, 19:22 UTC
- Message-ID
- <7veikfk8zl.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1266621718-4879-3-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> gitmkstemps emulates the behavior of mkstemps, which is usually used > to create files in a shared directory like /tmp/, hence, it creates > files with permission 0600. But we use it also to create pack files, > which do not need this protection.
... and the conclusion is???
Add git_mkstemps_mode() that allows us to specify the desired
mode, and make git_mkstemps() a wrapper that always uses 0600
to call it. Later we will use git_mkstemps_mode() when creating
pack files.Without it, it sounds as if "so we change it not to do 0600 because I only care about packfile creation, and do not care about future bugs when people assume that git_mkstemps() behaves just like mkstemps()", but that is not what you did.