Thread (24 messages) 24 messages, 2 authors, 2025-08-08

Re: [PATCH v5 0/3] remote.c: remove erroneous BUG case

From: Patrick Steinhardt <hidden>
Date: 2025-08-08 07:28:55

On Fri, Aug 08, 2025 at 12:24:39AM -0700, Denton Liu wrote:
In the case where one pushes a non-existent oid to an unqualified
destination, we encounter the following BUG

	error: The destination you provided is not a full refname (i.e.,
	starting with "refs/"). We tried to guess what you meant by:

	- Looking for a ref that matches 'branch' on the remote side.
	- Checking if the <src> being pushed ('0000000000000000000000000000000000000001')
	  is a ref in "refs/{heads,tags}/". If so we add a corresponding
	  refs/{heads,tags}/ prefix on the remote side.

	Neither worked, so we gave up. You must fully qualify the ref.
	BUG: remote.c:1221: '0000000000000000000000000000000000000001' should be commit/tag/tree/blob, is '-1'
	fatal: the remote end hung up unexpectedly
	Aborted (core dumped)

However, this isn't actually a bug so replace it with an advise()
message.

Changes since v4:

* Put the switch statement refactoring patch last so that we don't get
  compile errors from a missing variable
Thanks, this version looks good to me.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help