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

Re: fatal: cannot store pack file (git 1.6.0.2 + sshfs)

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 24, 2008, 16:34 UTC
Message-ID
<20080924163400.GU3669@spearce.org>
In-Reply-To
<87iqsmy8q7.fsf@sms.ed.ac.uk>
Jhair Tocancipa Triana <jhair.tocancipa@gmail.com> wrote:
> I'm getting the following when running git on a partition mounted with
> sshfs:
> 
> $ git pull
...
Show 9 quoted lines
> error: unable to write sha1 filename .git/objects/pack/pack-dc5c3614e795918f457a2f98a58f10134ebf246b.pack: Operation not permitted
> fatal: cannot store pack file
> fatal: index-pack failed
> 
> git pull worked fine in the same repository yesterday (new files where
> committed in the meantime).
> 
> I'm not sure if this is a problem in git or in sshfs (or somewhere
> else).

Its the size of the fetch. The day before you probably had a smaller number of objects downloaded (<100) so Git used unpack-objects instead of index-pack. Yesterday it was a larger download (>100), so it used index-pack.

In 1.6.0.2 index-pack writes a temporary file to .git/objects but later tries to rename it into .git/objects/pack. That renaming must not be working on sshfs.

Latest "master" has a change from Pasky (8b4eb6b6 "Do not perform cross-directory renames") that should fix this issue. Or just don't use sshfs. Or teach sshfs to rename across directories.

-- 
Shawn.
Previous: Jhair Tocancipa TrianaNext: Nathan W. Panike
Message 2 of 4 in “fatal: cannot store pack file (git 1.6.0.2 + sshfs)”
  1. Jhair Tocancipa TrianaSep 23, 2008
  2. Shawn O. PearceSep 24, 2008
  3. Nathan W. PanikeSep 24, 2008
  4. Jhair Tocancipa TrianaSep 24, 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.