Re: [PATCH] log which temporary file could not be created
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 10, 2010, 02:41 UTC
- Message-ID
- <20101010024124.GA20305@burratino>
- In-Reply-To
- <20101009201751.GK9348@bzzt.net>
Hi,
Arnout Engelen wrote:
> When creating a temporary file, log the template.
Since mkstemp modifies its template, these hopefully would print the actual filename on errors. Examples:
fatal: Unable to create temporary file '.merge_file_Sc7R5c': File exists fatal: Unable to create temporary file 'newrepo/.git/tOWHcxk': No space left on device
Unfortunately some mkstemp()s (such as that used to implement git_mkstemp_mode()) clear the template on error, which would result in
fatal: Unable to create temporary file '': Permission denied
What should git do in this situation?
> Useful for making debugging > problems like file permission mistakes easier.
Agreed. Thanks.