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

Re: [PATCH] tag deletions not rejected with receive.denyDeletes= true

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2011, 19:15 UTC
Message-ID
<7vy5uleeue.fsf@alter.siamese.dyndns.org>
In-Reply-To
<18683796.591323420674000.JavaMail.root@promailix.prometil.com>
Jerome DE VIVIE <j.devivie@prometil.com> writes:
Show 8 quoted lines
> Hello,
>
> I have try to deny tag deletion over push using denyDeletes parameter:
>
> git config --system receive.denyDeletes true
> git daemon --reuseaddr --base-path=.. --export-all --verbose --enable=receive-pack
>
> I can push tag deletions despite what the internet says (http://progit.org/book/ch7-1.html#receivedenydeletes). I don't know if it is a bug. Could you have a look, pls ? Thank you

The code seems to be written in such a way that it _explicitly_ wants to limit the effect of the configuration only to branches. The change was introduced by a240de1 (Introduce receive.denyDeletes, 2008-11-01) and the motivation was explained as:

    Introduce receive.denyDeletes
    
    Occasionally, it may be useful to prevent branches from getting deleted from
    a centralized repository, particularly when no administrative access to the
    server is available to undo it via reflog. It also makes
    receive.denyNonFastForwards more useful if it is used for access control
    since it prevents force-updating by deleting and re-creating a ref.
So I would have to say your "the internet" is wrong.

Our documentation can also use some updates, as it dates to the days back when we more liberally used "refs" and "branches" interchangeably.

Previous: Jerome DE VIVIE
Message 2 of 2 in “tag deletions not rejected with receive.denyDeletes= true”
  1. tag deletions not rejected with receive.denyDeletes= trueJerome DE VIVIE, Dec 9, 2011
  2. Junio C HamanoDec 9, 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.