git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] sha1_file: avoid bogus "file exists" error message

From
Joey Hess <joey@kitenet.net>
Date
Nov 28, 2008, 17:00 UTC
Message-ID
<20081128170015.GA9744@kodama.kitenet.net>
In-Reply-To
<alpine.LFD.2.00.0811271233590.2883@sys-0.hiltweb.site>
Ian Hilt wrote:
Show 10 quoted lines
> On Wed, 26 Nov 2008, Joey Hess wrote:
> > Joey Hess wrote:
> > > Note that in both occasions that I've seen this failure, it has not been
> > > due to a missing directory, or bad permissions
> > 
> > Actually, it was due to bad permissions. :-) Once git was fixed to
> > actually say that, I figured out where to look to fix them.
> 
> This is strange since write_loose_object() which calls create_tmpfile()
> checks for EPERM.  Perhaps this should be done in create_tmpfile()?

errno is clobbered by the mkdir in create_tmpfile(), that's what my patch corrects.

I suspect that in my case, mkstemp failed with EACCES, not EPERM. git was running as a group that did not have write access to (some) object directories.

-- 
see shy jo
Previous: Ian Hilt
Message 4 of 4 in “sha1_file: avoid bogus "file exists" error message”
  1. sha1_file: avoid bogus "file exists" error messageJoey Hess, Nov 20, 2008
  2. Joey HessNov 26, 2008
  3. Ian HiltNov 27, 2008
  4. Joey HessNov 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.