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

deleting non-existent ref via push

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Sep 23, 2011, 05:04 UTC
Message-ID
<CAMK1S_gksrR800yJHSnQWDNeDvD75+3Rp+qRWCuUrQyWmNDMsA@mail.gmail.com>
Hello,

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.

Seem like a great way to "poke" a remote repo into executing hooks without having to make a dummy change and push :-)

-- 
Sitaram
Next: Junio C Hamano
Message 1 of 3 in “deleting non-existent ref via push”
  1. Sitaram ChamartySep 23, 2011
  2. Junio C HamanoSep 23, 2011
  3. Sitaram ChamartySep 24, 2011

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.