Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Missing tree/blob <hash> when trying to push

Hi Sascha,

On Fri, Oct 10, 2014 at 8:45 AM, Sascha Vogt <sascha.vogt@xxxxxxxxx> wrote:
> A few additional notes:
> If such an issue occurs we ran "git fsck --full" and you're right, there
> are usually "dangling commits" found.
>
> We also usually manually run a "git gc" which on all but one occasion
> didn't fix the issue. The next time it arises I'll test if a
>     git reflog expire --expire=now --all
>     git gc --aggressive --prune=now
> helps.

Right. You have to make sure the reflogs are clean and gc is run aggressive.
Afterwards a "git fsck" should not show any dangling objects.

> Is there anything else I could do / test if it fixes the issue (apart
> from a C-Git push)?

Most important would be save the state of client and server when the problem
occurs. If we have a reproduce able state than this is very valuable.
The problem
which I have in mind is still there after a failed push with EGit. But
any native
git operation on the client repo afterwards can clean the situation. And if the
the server refs are updated then this also changes the situation. If you can't
save the server state the you could also clone the server repo (fetching all
advertised refs, not only branches/tags)

> why only a few colleagues have an issue at all. Some projects use Gerrit
> and others only push to their topic branches and don't execute the
> merging and squashing...

The workflow you describe seems to be pretty normal. But there is something
special with gerrit in this situation. To produce the bug you have to do a push
and the server has to advertise refs which are in your local repo unreferenced.
Because gerrit advertises every single commit pushed to code review underneath
"refs/changes/xy/z" it is very likely that the server advertises refs which the
local repo know about but which are now unreferenced. I would guess that
gerrit servers are more likely to produce the situation that the push fails than
other git servers.

> PS: I think everyone posting to the EGit mailinglist must be subscribed.
> Wouldn't it be better to just use the list as a recipient instead of
> huge to and cc lists? Or do you prefer to be adressed directly?

Right, sorry. Fixed this. No, I don't prefer to be adressed directly.


Back to the top