Push failures drop some of git's error explanations

Bug #1541284 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
turnip
Invalid
Undecided
Unassigned

Bug Description

"git push <local annotated tag name>:refs/heads/<new branch name>" fails because the remote git will not accept an annotated tag as a commit object that a branch can point to. For example:

$ git push localhost:/tmp/foo refs/tags/2.11-1ubuntu1:refs/heads/ubuntu/devel
Authenticated with partial success.
Verification code:
Password:
Counting objects: 50, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (50/50), 65.26 KiB | 0 bytes/s, done.
Total 50 (delta 4), reused 0 (delta 0)
error: Trying to write non-commit object 8bd94ee19a36c6e1fae755a8a572150b442b0e54 to branch refs/heads/ubuntu/devel
remote: error: cannot update the ref 'refs/heads/ubuntu/devel'.
To localhost:/tmp/foo
 ! [remote rejected] 2.11-1ubuntu1 -> ubuntu/devel (failed to update ref)
error: failed to push some refs to 'localhost:/tmp/foo'

While I would like git to dtrt here, that is a git (perhaps wishlist) bug and not a bug in turnip.

However, when I do the same thing to Launchpad, I do not see the "error: Trying to write to non-commit object ..." message, making it difficult to understand what is wrong. The message I see is the same as above, except that single line "error: Trying to write..." is missing. For example:

$ git push lp:~racb/ubuntu/+source/ntp 1_4.2.6.p5+dfsg-3ubuntu9:refs/heads/ubuntu/devel
Counting objects: 45, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (45/45), done.
Writing objects: 100% (45/45), 37.35 KiB | 0 bytes/s, done.
Total 45 (delta 13), reused 0 (delta 0)
To git+ssh://<email address hidden>/~racb/ubuntu/+source/ntp
 ! [remote rejected] 1_4.2.6.p5+dfsg-3ubuntu9 -> ubuntu/devel (failed to write)
error: failed to push some refs to 'git+ssh://<email address hidden>/~racb/ubuntu/+source/ntp'

So: expected result: "error: Trying to write..." message; actual result: all of the same text except for that line.

William Grant (wgrant)
Changed in turnip:
status: New → Invalid
Revision history for this message
William Grant (wgrant) wrote :

This is actually down the version of git on the server. It'll be fixed when production is upgraded to xenial.

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.