git review sometimes causes unpacker error for Missing tree

Bug #1332549 reported by Stéphane Duchesneau
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
git-review
New
Undecided
Unassigned

Bug Description

This is apparently a bug in JGit (implemented in gerrit), but the simplest workaround requires change on the git-review side.

Behaviour:
* Occasionnal failure on "git review" command can prevent push for revs.

### snip ###
git review
error: unpack failed: error Missing tree 99af9575b7587a755868f5c25398acad1a69ef7d
fatal: Unpack error, check server log
To ssh://<email address hidden>:29418/project
 ! [remote rejected] HEAD -> refs/publish/master/somebranch (n/a (unpacker error))
error: failed to push some refs to 'ssh://<email address hidden>:29418/project'
### snap ###

It is related to buggy support of git "thin" optimization in JGit implementation in gerrit.

ref:
https://code.google.com/p/gerrit/issues/detail?id=1582
https://code.google.com/p/gerrit/issues/detail?id=2296

A simple workaround is to use "git push --no-thin", so allowing that option to be configured as default in git-review.conf would allow a workaround.

Revision history for this message
Stéphane Duchesneau (stephane-duchesneau) wrote :

Created a patch (and pull request to upstream)

See it in action here:
<pre>
$ grep disablethinpush ~/.config/git-review/git-review.conf
disablethinpush = true

$ git review -v
[...]
2014-06-20 11:47:22.483602 Running: git push --no-thin origin HEAD:refs/publish/master
[...]

rm ~/.config/git-review/git-review.conf

$ git review -v --no-thin
[...]
2014-06-20 11:55:57.272656 Running: git push --no-thin origin HEAD:refs/publish/master
[...]

$ git review -v
[...]
2014-06-20 11:57:13.375985 Running: git push origin HEAD:refs/publish/master
[...]
</pre>

Revision history for this message
James Byrne (james-byrne-q) wrote :

Although this issue hasn't been updated in over a year, it still affects the latest version of Gerrit (currently 2.11.3). It would be very useful to have this option in the released version of git-review, so is there any chance this patch will be applied to a forthcoming release?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.