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

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

 



Hi Junio,

On Wed, 30 Dec 2015, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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
--
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]