All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Xavier Morel <xmo@odoo.com>
Cc: git@vger.kernel.org
Subject: Re: `git push --porcelain` has no effect when deleting a ref which does not exist
Date: Wed, 05 Aug 2026 09:30:14 -0700	[thread overview]
Message-ID: <xmqq33wssf6x.fsf@gitster.g> (raw)
In-Reply-To: <27d95520-409e-4d1b-b8b1-37a910bff604@odoo.com> (Xavier Morel's message of "Wed, 5 Aug 2026 09:19:13 +0200")

Xavier Morel <xmo@odoo.com> writes:

> 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.


  reply	other threads:[~2026-08-05 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  7:19 `git push --porcelain` has no effect when deleting a ref which does not exist Xavier Morel
2026-08-05 16:30 ` Junio C Hamano [this message]
2026-08-07  6:51   ` Xavier Morel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq33wssf6x.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=xmo@odoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.