Re: [PATCH] commit: ensure correct permissions of the commit message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 06, 2016 at 09:20:34AM +0100, Johannes Schindelin wrote:

> Hi Junio,
> 
> On Tue, 5 Jan 2016, Junio C Hamano wrote:
> 
> > If we want to follow the X_or_Y() pattern, fopen_or_create() may
> > describe what it does better.  I do not have strong preference either
> > way, but again I am not good at naming things (and I suspect you aren't
> > either), so...
> 
> Heh... You got that right...
> 
> Let's let it simmer for a couple more days, maybe somebody else chimes in
> with a brilliant idea... :-)

I can be the anti-brilliant and just shoot down what has been said. :)

I think fopen_or_create is confusing; it implies to me that we'll open
an existing file or create it if it's not there. But we are always about
truncating/replacing the existing file.

I think fopen_for_writing() is fine, or fopen_truncate().

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]