From: Junio C Hamano <gitster@pobox.com>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: deleting non-existent ref via push
Date: Fri, 23 Sep 2011 11:16:03 -0700 [thread overview]
Message-ID: <7vmxdvunto.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAMK1S_gksrR800yJHSnQWDNeDvD75+3Rp+qRWCuUrQyWmNDMsA@mail.gmail.com> (Sitaram Chamarty's message of "Fri, 23 Sep 2011 10:34:26 +0530")
Sitaram Chamarty <sitaramc@gmail.com> writes:
> Pushing to delete a non-existent ref (git push origin :refs/heads/foo)
> works without error, except for a warning that the remote is "Allowing
> deletion of corrupt ref". By "works" I mean all hooks are also
> executed.
>
> Is this expected/supported behaviour? Can I rely on it continuing to
> work, especially in terms of executing hooks.
This most definitely is just "we didn't bother checking the error too
carefully, especially because the result of deleting something that did
not exist in the first place is a no-op; anybody who tries to delete a
non-existing thing is a moron and deserves whatever random result he
gets".
It would be a good idea to tighten it.
next prev parent reply other threads:[~2011-09-23 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 5:04 deleting non-existent ref via push Sitaram Chamarty
2011-09-23 18:16 ` Junio C Hamano [this message]
2011-09-24 3:11 ` Sitaram Chamarty
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=7vmxdvunto.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sitaramc@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).