From: Johannes Schindelin Date: Fri, 01 Jan 2016 15:04:25 GMT Subject: Re: [PATCH] commit: ensure correct permissions of the commit message Message-ID: In-Reply-To: Hi Junio, On Wed, 30 Dec 2015, Junio C Hamano wrote: > Johannes Schindelin writes: > > > So maybe > > > > fcreate_or_truncate(const char *path) > > { > > FILE *ret = fopen(path, "w"); > > > > if (!ret && errno == EPERM) { > > if (!unlink(path)) > > ret = fopen(path, "w"); > > else > > errno = EPERM; > > } > > return ret; > > } > > > > ? > > I do not know fcreate_or_truncate() is a good name, though. So what would be a good name? Ciao, Dscho