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

fetch fails with a short read of received pack

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 9, 2008, 19:55 UTC
Message-ID
<20081009195518.GA1497@blimp.localhost>

Somehow I got my gnulib mirror to a strange state where I can't fetch anything from it:

    $ cd gnulib
    $ git fetch -f ../gnulib.git 'refs/heads/*:refs/remotes/origin/*'
    remote: Counting objects: 2202, done.
    remote: Compressing objects: 100% (633/633), done.
    remote: Total 1769 (delta 1448), reused 1455 (delta 1134)
    Receiving objects: 100% (1769/1769), 404.11 KiB, done.
    fatal: premature end of pack file, 1745 bytes missing
    fatal: index-pack failed

This is with current Shawn's master (Junio's master erroneously gives an error). Bisect points at ac0463ed44e859c84e354cd0ae47d9b5b124e112

    pack-objects: use fixup_pack_header_footer()'s validation mode
    When limiting the pack size, a new header has to be written to the
    pack and a new SHA1 computed.  Make sure that the SHA1 of what is being
    read back matches the SHA1 of what was written.

This and the diff make no sense to me (as to what could be broken). I made both repos available at:

    The source, it unpacks in gitlib.git (as in example above)
	http://vin-soft.org/~ftp-tmp/gnulib-broken-src.tar.bz2
    The target, where the fetch in the example is run
	http://vin-soft.org/~ftp-tmp/gnulib-broken-tgt.tar.bz2
Could someone who actually understands the code please have a look?
Next: Samuel Tardieu
Message 1 of 7 in “fetch fails with a short read of received pack”
  1. Alex RiesenOct 9, 2008
  2. Samuel TardieuOct 9, 2008
  3. Nicolas PitreOct 9, 2008
  4. fix pread()'s short read in index-packNicolas Pitre, Oct 10, 2008
  5. Alex RiesenOct 10, 2008
  6. Shawn O. PearceOct 10, 2008
  7. Nicolas PitreOct 10, 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.