How to repair a shallow clone (?)

5 messages, 4 authors, 2016-06-15 · open the first message on its own page

How to repair a shallow clone (?)

From: Torsten Bögershausen <hidden>
Date: 2016-06-15 23:03:13

I share a bare repo with Sparkleshare which does an auto-synch.
Now the synch had stopped, and trying to push to the central repo
by hand gives this:



git push  origin master
fatal: protocol error: expected old/new/ref, got 'shallow 72fb4080921221293e28a97a0e8c78d6100c5186'
fatal: The remote end hung up unexpectedly
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
error: pack-objects died of signal 13
error: failed to push some refs to xxxxx

Both machines have Git >2.0.0

Is this a known issue/problem ?

I think I started to clone the repo in a shallow way
(SparkleShare asked if I want to clone the complete history,
and I probably answered "no" )

Is there a way to repair this situation ?
(Except doing a complete re-clone ?)

Thanks for help

Re: How to repair a shallow clone (?)

From: Trần Ngọc Quân <hidden>
Date: 2016-06-15 23:03:13

On 06/12/2014 19:23, Torsten Bögershausen wrote:
I think I started to clone the repo in a shallow way
(SparkleShare asked if I want to clone the complete history,
and I probably answered "no" )

Is there a way to repair this situation ?
(Except doing a complete re-clone ?)
I think git don't accept push from shallow repo. I've ever encounter
this problem. I UNshallow it, then every thing will work:

$ git fetch --unshallow origin

This command will convert a shallow repository to a complete one.
See git-fetch(1) and git-clone(1).

I hope it helpful!
Thanks,

-- 
Trần Ngọc Quân.

Re: How to repair a shallow clone (?)

From: Philip Oakley <hidden>
Date: 2016-06-15 23:03:13

From: "Trần Ngọc Quân" <redacted>
On 06/12/2014 19:23, Torsten Bögershausen wrote:
quoted
I think I started to clone the repo in a shallow way
(SparkleShare asked if I want to clone the complete history,
and I probably answered "no" )

Is there a way to repair this situation ?
(Except doing a complete re-clone ?)
I think git don't accept push from shallow repo. I've ever encounter
this problem. I UNshallow it, then every thing will work:

$ git fetch --unshallow origin

This command will convert a shallow repository to a complete one.
See git-fetch(1) and git-clone(1).
Since v1.9.0 (14 Feb '14.) you can do various push/pull from a shallow 
clone (I'd asked this way back 
http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone 
and noted when it was corrected/improved)

That's not to say that you don't have to take care about your local 
depth being sufficiently inclusive.

I'm sure that sometime a --timedepth=<time_t time> will eventually be 
coded by someone sufficiently in need. ;-)

--
Philip 

Re: How to repair a shallow clone (?)

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:03:13

On Sat, Dec 6, 2014 at 7:23 PM, Torsten Bögershausen [off-list ref] wrote:
I share a bare repo with Sparkleshare which does an auto-synch.
Now the synch had stopped, and trying to push to the central repo
by hand gives this:



git push  origin master
fatal: protocol error: expected old/new/ref, got 'shallow 72fb4080921221293e28a97a0e8c78d6100c5186'
fatal: The remote end hung up unexpectedly
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
error: pack-objects died of signal 13
error: failed to push some refs to xxxxx

Both machines have Git >2.0.0
Please try again with $GIT_TRACE_PACKET=/some-log-file. receive-pack
2.0 should recognize this shallow line.
Is this a known issue/problem ?
No.
-- 
Duy

Re: How to repair a shallow clone (?)

From: Torsten Bögershausen <hidden>
Date: 2016-06-15 23:03:13

On 2014-12-07 12.44, Duy Nguyen wrote:
quoted
Is this a known issue/problem ?
No.
Thanks everybody for the support.

The machine was equipped with git version 1.7.10.4 in /usr/bin.

I installed 2.1 or so under /usr/local/bin, (and even /root/bin) 
thinking that this would help, but it didn't.

Because the login shell for the user "storage" which manages the push/pull
on the server side was /usr/bin/git-shell, not /usr/local/bin/git-shell.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help