Re: [PATCH] commit: ensure correct permissions of the commit message
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 15, 2016, 06:51 UTC
- Message-ID
- <alpine.DEB.2.20.1601150750340.2964@virtualbox>
- In-Reply-To
- <xmqqegdjk4ud.fsf@gitster.mtv.corp.google.com>
Hi,
On Thu, 14 Jan 2016, Junio C Hamano wrote:
Show 24 quoted lines
> SZEDER Gábor <szeder@ira.uka.de> writes: > > > Quoting Junio C Hamano <gitster@pobox.com>: > > > >> Actually, we do not even _need_ a sharedness for this ephemeral file. > >> The additional "adjust-shared-perm" is merely a workaround for the > >> fact the next person cannot write into it when it is left behind, and > >> because we do not want to remove it when we are done. > > > > Do we really want to keep such a file after we are done? > > There is no strong reason we should want to remove them, either. > > As long as the lazy garbage collection works, there is no incentive > to change things. I do not have strong objection against such a > change, as long as you do not break people's existing practices, > either, though. > > Whoever is designing such a change must carefully define what "after > we are done" exactly means. Removing such a file immediately after > the command read from it is likely to be a bad idea, for example, if > the command supports hooks that are invoked after the command reads > and uses the contents of it, as the hooks may be depending on the > presence of it and the ability to read from it.
... and do not forget scripts that call `git commit`. They can expect the presence of that file after a successful operation right now. You will have to warn any potential user of such a script that you are going to break their setup.
Ciao, Dscho