Closed henesy closed 5 years ago
Fwiw, copying the exact repository (incl .git dir) to linux and pushing with git there works, so I don't think my .git/config is set up wrong
No, it sounds like it's not finding the object for one of the blobs.. is this an initial commit/push to the repo or a follow-up one? I'll clone the repo and take a look when I'm at a computer, but if I can't reproduce it with the cloned copy would you be able to put the .git folder somewhere?
edit: no need, I can reproduce by trying to push that repo to a new, empty github repo..
You can apply this patch as a temporary workaround:
diff --git a/git/sha1.go b/git/sha1.go
index f8c881d..14267ca 100644
--- a/git/sha1.go
+++ b/git/sha1.go
@@ -679,6 +679,10 @@ func (t TreeID) GetAllObjectsExcept(cl *Client, excludeList map[Sha1]struct{}, p
if excludeList != nil {
excludeList[Sha1(t)] = struct{}{}
}
+ if (Sha1(t) == Sha1{}) {
+ // Consider the empty Sha1 to be the same as an empty tree.
+ return nil, nil
+ }
o, err := cl.GetObject(Sha1(t))
if err != nil {
return nil, err
but I want to figure out why dgit rev-list --objects 81fd72e88d58ed746ed032342de3579b178c84db
(which is used to find the list of objects to push) ends up there with an empty Sha1 before pushing the fix to master, because it looks like there's something weird going on on a deeper level.
Oh that’s a bit spooky
I’ll apply then patch when I get home, glad I could sniff something out for ya :)
I thought #249 should fix the root of it, but it looks like after the rev-list problem it's still generating an invalid packfile when I try pushing (but getting past the Object not found error message, at least).. so the patch above might still not be able to push afterall, I'll have to dig a little more.
Okay, I managed to push that repo to https://github.com/driusan/ducker-test after the changes from #251 .. can you give it a try with the master branch?
Seems to work now!
https://github.com/henesy/ducker-test was my test repo, no problems on push.
Weird bug, but thank you so much for the fix :)
As per title, I am now unable to push with dgit, but I haven't tried in quite awhile, maybe I'm missing something obvious?
This should be on the latest dgit commit.
% git push --set-upstream origin master
, no changeShell transcript: