Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364636 - git pull crashes after other member pushes something
Summary: git pull crashes after other member pushes something
Status: RESOLVED INVALID
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-23 13:41 EST by dantart CLA
Modified: 2011-12-12 20:27 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dantart CLA 2011-11-23 13:41:49 EST
Build Identifier: egit.core_1.1.0.201109151100-r

Here it's the story... we have a Github account.

I clone the repository ... then I can work with it, commit things, push things, etc ... I use Linux with command line and git version 1.7.7.3

Then other user, using Eclipse and git plugin for eclipse eGit 1.1.0 pushes something, and it appears in the github web pages as the last commit, but when I try to pull:

$ git pull
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 2), reused 7 (delta 0)
Unpacking objects: 100% (9/9), done.
error: unable to find 3e6c5386cab0c605877f296642d5183f582964b6
fatal: object 3e6c5386cab0c605877f296642d5183f582964b6 not found
"3e6c5386cab0c605877f296642d5183f582964b6" is the commit hash of the last commit, done by the other user ... there's no problem at all to browse it through web page ... but for me it's impossible to pull it.

It's strange, because my command line output tells about that commit hash, so it knows that one is the last one commit in the github system, but my git can not pull it !

Maybe the git protocol used in eGit is incompatible with the console git 1.7.7.3...

By the way ... git fsck gives nothing:

$ git fsck
dangling commit bb76ff001cad4e32236a98ef2ec8b9bf901b7030

Reproducible: Always

Steps to Reproduce:
1. Both members clone the repository (linux one through console, windows one through egit eclipse software) ... no problems , they can clone, push and pull their changes.
2. after egit one pushes something
3. the linux one can't pull no more
Comment 1 dantart CLA 2011-11-23 16:36:12 EST
I have tried creating a new repository with just one file of one line, and the problem persists.

Players:
1) Windows 7 + Eclipse + egit.core_1.1.0.201109151100-r  (we have tried also with the last nightly build)
2) Linux + Git 1.7.7.3

Steps:

1) Any of players create the repository with one file and one line in it

2) Linux player change the line, commit and push

3) Windows player pull ... change the line, commit and push

4) Linux can't pull anymore, it appears:

error: unable to find xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
fatal: object xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx not found


being "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  the last commit hash as shown in the github.com repository through web page

Since the moment Windows player pushes the first time, the Linux players can't pull anymore.
Comment 2 dantart CLA 2011-11-24 03:12:46 EST
I have noticed the following:  in the linux, if I do a reset to HEAD, it says the HEAD is the last commit a linux user did into github.

So, for example (order by date desc)

now                  commit abcabc  done by windows user (this is the last in the github)
5 min ago         commit xyzxyz   done by linux user


The problem is that when I do the pull I get:
error: unable to find abcabc
fatal: object abcabc not found

So it knows in some way, the HEAD is that one, but it can't find it.

But if I try a reset to HEAD:
git reset --hard HEAD
HEAD is now at xyzxyz .

it does not know the HEAD is the correct one ... it stays in the last one done by a linux user.

(If I delete the repo and clone it again, there's no problem at all ... it gets the last one)

So, I assume the problem is, in some way, the "pull" command knows the last commit hash, but it does not know how to grab it.

Any ideas ?
Comment 3 Matthias Sohn CLA 2011-11-25 16:25:21 EST
Can we access your test repository ?
Comment 4 dantart CLA 2011-11-28 03:55:20 EST
(In reply to comment #3)
> Can we access your test repository ?


Hi ... not really, I don't have perms to do that ... but a friend of mine did the same and happened exactly the same error ... so it's not about an specific repository or even versions of software !
Comment 5 Kevin Sawicki CLA 2011-11-29 19:26:37 EST
Is your friend's repository accessible?
Comment 6 Matthias Sohn CLA 2011-12-06 19:19:39 EST
Could you create a small public sample repository showing this behavior
and provide step-by-step instructions how to reproduce your problem ?
Comment 7 Kevin Sawicki CLA 2011-12-12 20:27:48 EST
This was discovered to be a bug in CGit when multiple refs in a repo containe: "refs/heads/master" in their full name