From: Jerome DE VIVIE <j.devivie@prometil•com>
To: git@vger•kernel.org
Subject: [PATCH] tag deletions not rejected with receive.denyDeletes= true
Date: Fri, 9 Dec 2011 09:51:14 +0100 (CET) [thread overview]
Message-ID: <18683796.591323420674000.JavaMail.root@promailix.prometil.com> (raw)
In-Reply-To: <18285669.571323420520289.JavaMail.root@promailix.prometil.com>
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
BR
Jérôme
Signed-off-by: Jérôme de Vivie <j.edevivie@prometil•com>
---
builtin/receive-pack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 7ec68a1..bf91042 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -432,7 +432,7 @@ static const char *update(struct command *cmd)
}
if (!is_null_sha1(old_sha1) && is_null_sha1(new_sha1)) {
- if (deny_deletes && !prefixcmp(name, "refs/heads/")) {
+ if (deny_deletes && (!prefixcmp(name, "refs/heads/") || !prefixcmp(name, "refs/tags/"))) {
rp_error("denying ref deletion for %s", name);
return "deletion prohibited";
}
--
1.7.6.msysgit.0
next parent reply other threads:[~2011-12-09 9:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18285669.571323420520289.JavaMail.root@promailix.prometil.com>
2011-12-09 8:51 ` Jerome DE VIVIE [this message]
2011-12-09 19:15 ` [PATCH] tag deletions not rejected with receive.denyDeletes= true Junio C Hamano
[not found] <6271653.2751323698446271.JavaMail.root@promailix.prometil.com>
2011-12-12 14:06 ` Jerome DE VIVIE
2011-12-12 17:16 ` Junio C Hamano
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=18683796.591323420674000.JavaMail.root@promailix.prometil.com \
--to=j.devivie@prometil$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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