git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Cc: git@vger.kernel.org
Subject: Re: denyNonFastForwards & co fail outside refs/<heads,tags>
Date: Tue, 29 Mar 2011 16:59:19 -0700	[thread overview]
Message-ID: <7vy63xo4vc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <hbf.20110329j1zo@bombur.uio.no> (Hallvard B. Furuseth's message of "Tue, 29 Mar 2011 13:54:00 +0200")

Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> config options receive.<denyNonFastForward, denyDeletes> do not work in
> nonstandard ref namespaces.  I stumbled over it in refs/notes/, but the
> problem is general.  Or if it this intentional, it is the git-config(1)
> doc of these options which needs fixing.

I think it is very deliberate that denyNonFastForward does not check
anything outside local branch namespace, because there may not even be
ancestry relationship between the object a tag currently points at and the
new object the tag is trying to update (think: a tag can point at a tree
or a blob) and more importantly because pushing into refs/remotes/origin/*
namespace (which is the right way to simulate a "git fetch" from the
repository with a "git push" from outside into the repository in a
firewalled environment where you cannot initiate a connection in one
direction) should be allowed (just like "remote.*.fetch" line in
.git/config get a leading plus sign '+' by default).

I suspect that the restriction on deny_deletes was inherited by a mindless
cut & paste from the deny_non_fast_forwards codepath; I don't think of a
sane rationale to justify the limitation offhand, other than "it has been
wide open since November of 2008 and people may now be relying on that".

      reply	other threads:[~2011-03-29 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 11:54 denyNonFastForwards & co fail outside refs/<heads,tags> Hallvard B Furuseth
2011-03-29 23:59 ` Junio C Hamano [this message]

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=7vy63xo4vc.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=h.b.furuseth@usit.uio.no \
    /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).