git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: `git push --porcelain` has no effect when deleting a ref which does not exist

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2026, 16:30 UTC
Message-ID
<xmqq33wssf6x.fsf@gitster.g>
In-Reply-To
<27d95520-409e-4d1b-b8b1-37a910bff604@odoo.com>
Xavier Morel <xmo@odoo.com> writes:
Show 20 quoted lines
> Using `push --delete --porcelain` with refs which are extant correctly 
> outputs the relevant information in the documented format:
>
> -	:refs/heads/<branch1>	[deleted]
> -	:refs/heads/<branch2>	[deleted]
>
> However doing the same with refs which don't exist on the remote (e.g. 
> because of a concurrent deletion) has the error written out in 
> human-targeted text:
>
> error: unable to delete '<branch1>': remote ref does not exist
> error: unable to delete '<branch2>': remote ref does not exist
>
> I would have expected something along the lines of:
>
> !	:refs/heads/<branch>	[remote failure]
>
> which would be machine-readable as documented for the `--porcelain` 
> flag. Was that intended or is it just something that fell through the 
> cracks of code convolution?

If I have to guess, I would say it is because nobody thought of covering this usage pattern, which allows you to randomly throw a deletion request to probe what does and what does not exist on the other side.

Patches welcome.
Thanks.
Previous: Xavier MorelNext: Xavier Morel
Message 2 of 3 in “`git push --porcelain` has no effect when deleting a ref which does not exist”
  1. Xavier MorelAug 5, 2026
  2. Junio C HamanoAug 5, 2026
  3. Xavier MorelAug 7, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.