How to repair a shallow clone (?)
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
Quoted 7 lines · Torsten Bögershausen
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,
Signature · 1 line
Trần Ngọc Quân.
From: "Trần Ngọc Quân" <[email protected]>
Quoted 8 lines · Torsten Bögershausen
Quoted 7 lines
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 ?)
Quoted 8 lines
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 originThis 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
Quoted 15 lines · Torsten Bögershausen
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 'shallow72fb4080921221293e28a97a0e8c78d6100c5186'
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
Quoted 1 line
Both machines have Git >2.0.0
Please try again with $GIT_TRACE_PACKET=/some-log-file. receive-pack
Quoted 3 lines
2.0 should recognize this shallow line.
Is this a known issue/problem ?
No.
Signature · 1 line
Duy
Quoted 4 lines · Duy Nguyen
Quoted 1 line
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.