Re: [PATCH] commit: ensure correct permissions of the commit message
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 1, 2016, 15:04 UTC
- Message-ID
- <alpine.DEB.2.20.1601011604070.14434@virtualbox>
- In-Reply-To
- <xmqqfuyjczpv.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 30 Dec 2015, Junio C Hamano wrote:
Show 20 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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