git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Bug report: stash in upstream caused remote fetch to fail
@ 2014-01-03 21:12 Matt Burke
  2014-01-06 15:27 ` Jeff King
  0 siblings, 1 reply; 12+ messages in thread
From: Matt Burke @ 2014-01-03 21:12 UTC (permalink / raw)
  To: git

I ran into the same (or similar) problem as reported in
<http://www.spinics.net/lists/git/msg173391.html>. I have a script
that, among other things, clones a git repository. Here's where it
does that:

+ git init -q
+ git fetch -q -fu ../../../other '+refs/*:refs/*'
fatal: bad object 9b985fbe6a2b783c16756077a8be261c94b6c197
error: ../../../other did not send all necessary objects

In ../../../other:

$ git rev-parse stash@{0}
9b985fbe6a2b783c16756077a8be261c94b6c197
$ grep stash .git/packed-refs
9b985fbe6a2b783c16756077a8be261c94b6c197 refs/stash
$ cat .git/refs/stash
9b985fbe6a2b783c16756077a8be261c94b6c197

I removed the line from packed-refs and removed the refs/stash file,
and the problem went away. Restoring packed-refs or refs/stash makes
the error occur again.

When this was reported before, Thomas Rast wrote:

> Do you, by any chance, still have a copy of the upstream repo before you
> trashed the stash?  It would be interesting to know whether there was
> actually some repository corruption going on (that went unnoticed by
> fsck, no less) or if there was a bug in the transmission.

I've still got the repository, and am happy to help debug this.

--
Matt

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Bug report: stash in upstream caused remote fetch to fail
@ 2012-02-01 16:59 Andrew Walrond
       [not found] ` <874nvap9hj.fsf@thomas.inf.ethz.ch>
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Walrond @ 2012-02-01 16:59 UTC (permalink / raw)
  To: andrew

A bit of cut and paste will explain better than me...

LOCAL $ git remote update
    Fetching origin
    remote: Counting objects: 25, done.
    remote: Compressing objects: 100% (12/12), done.
    remote: Total 13 (delta 10), reused 0 (delta 0)
    Unpacking objects: 100% (13/13), done.
    fatal: bad object fa0da15b2ea5cc3e4eb9ed414b99d6a9d7da7864
    error: git://git.heresymail.org/lib%2Fmpfr did not send all necessary
    objects

UPSTREAM $ git fsck
    dangling blob ded848b21db04fcadf77a4a5d9f81955b4315c9f
    dangling blob 9c3976919b3cee56eabc3c9c9dfe5d223ce32686
    dangling blob e17ab25a3a91bed830ddb06da4af1132434d5ee4
    dangling blob 20a612ab361058838f680d72c1f4f8cb462ce1a2

UPSTREAM $ git gc
    Counting objects: 974, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (954/954), done.
    Writing objects: 100% (974/974), done.
    Total 974 (delta 572), reused 0 (delta 0)

LOCAL $ git remote update
    Fetching origin
    remote: Counting objects: 25, done.
    remote: Compressing objects: 100% (10/10), done.
    remote: Total 13 (delta 3), reused 11 (delta 2)
    Unpacking objects: 100% (13/13), done.
    fatal: bad object fa0da15b2ea5cc3e4eb9ed414b99d6a9d7da7864
    error: git://git.heresymail.org/lib%2Fmpfr did not send all necessary
    objects

LOCAL $ DELETE LOCAL REPO

LOCAL $ git clone <upstream>
    Cloning into bare repository '/src/lib/mpfr'...
    remote: Counting objects: 972, done.
    remote: Compressing objects: 100% (382/382), done.
    remote: Total 972 (delta 570), reused 971 (delta 570)
    Receiving objects: 100% (972/972), 2.01 MiB, done.
    Resolving deltas: 100% (570/570), done.
    error: refs/stash does not point to a valid object!

UPSTREAM $ git stash list
    stash@{0}: WIP on (no branch): f648dd0 Import 3.1.0 from tarball

UPSTREAM $ git stash clear

LOCAL $ DELETE LOCAL REPO

LOCAL $ git clone <upstream>
    Cloning into bare repository '/src/lib/mpfr'...
    remote: Counting objects: 972, done.
    remote: Compressing objects: 100% (382/382), done.
    remote: Total 972 (delta 570), reused 971 (delta 570)
    Receiving objects: 100% (972/972), 2.01 MiB, done.
    Resolving deltas: 100% (570/570), done.

UPSTREAM $ git version
    git version 1.7.8.2

LOCAL $ git version
    git version 1.7.8.2

Hope that's useful!

Andrew Walrond

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-01-15 10:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-03 21:12 Bug report: stash in upstream caused remote fetch to fail Matt Burke
2014-01-06 15:27 ` Jeff King
2014-01-06 16:16   ` Junio C Hamano
2014-01-06 19:36     ` Jeff King
2014-01-06 20:17       ` Junio C Hamano
2014-01-06 23:03         ` Jeff King
2014-01-06 23:22           ` Junio C Hamano
2014-01-07  3:19             ` Junio C Hamano
2014-01-15 10:46               ` Jeff King
2014-01-15 10:48                 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2012-02-01 16:59 Andrew Walrond
     [not found] ` <874nvap9hj.fsf@thomas.inf.ethz.ch>
2012-02-01 22:37   ` Andrew Walrond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).