git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Dave Olszewski <cxreg@pobox.com>,
	git@vger.kernel.org, gitster@pobox.com, jrnieder@gmail.com
Subject: Re: [PATCH] push: warn users about updating existing tags on push
Date: Wed, 01 Sep 2010 08:18:55 -0700	[thread overview]
Message-ID: <7veidd7aqo.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTinn0Evi6tYMSt+FevJnFt1taQVzqhJKuiGKudOy@mail.gmail.com> (Tay Ray Chuan's message of "Wed\, 1 Sep 2010 11\:51\:05 +0800")

Tay Ray Chuan <rctay89@gmail.com> writes:

>> +push.denyMovingTags::
>> +       Whether or not a user will be allowed to push a tag that already
>> +       exists on the remote for a different object.  False by default.
>
> Hmm, it's a little weird to speak of "allowing" the user to do this
> and that. Perhaps
>
> 	Whether or not a push will be allowed to proceed if a tag...

I think that is a sensible suggestion.  Or even stronger "forbid updating
an existing tag; defaults to false".

>> +receive.denyMovingTags::
>> +       If set to true, git-receive-pack will deny an update to a tag which
>> +       already points to a different object.  Use this to prevent such an
>> +       update via a push, even if that push is forced.
>> +
>
> Perhaps
>
> 	If set to true, git-receive-pack will refuse to update to a tag to point the
> 	tag to a	different object.  Use this...

Sounds better.

>> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
>> index 658ff2f..1d53e04 100644
>> --- a/Documentation/git-push.txt
>> +++ b/Documentation/git-push.txt
>> @@ -112,7 +112,10 @@ nor in any Push line of the corresponding remotes file---see below).
>>        Usually, the command refuses to update a remote ref that is
>>        not an ancestor of the local ref used to overwrite it.
>>        This flag disables the check.  This can cause the
>> -       remote repository to lose commits; use it with care.
>> +       remote repository to lose commits; use it with care.  This
>> +       flag will also allow a previously pushed tag to be updated
>> +       to point to a new commit, which is refused if
>> +       push.denyMovingTags is set to true.
>
> Perhaps
>
> 	remote repository to lose commits; use it with care.
>
> 	Note that for tags that have already been pushed and have been updated
> 	locally, \--force will not update them if push.denyMovingTags is set to true.

I don't think the change to this section is necessary, _unless_ existing
mention of "remote ref" is changed to "remote branch" to exclude tags.  If
we wanted to say something, probably

    Note that the above applies both to branches and tags.

would be sufficient.  I don't think this is a place to enumerate
exceptions like this new configuration and all the other existing ones
(e.g. denynonfastforwards, denycurrentbranch, denydeletecurrent etc.)

      reply	other threads:[~2010-09-01 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27  7:14 [PATCH] push: disallow fast-forwarding tags without --force Dave Olszewski
2010-08-27 17:28 ` Junio C Hamano
2010-08-27 18:01   ` Dave Olszewski
2010-08-28  1:21     ` Jonathan Nieder
2010-08-28  8:22       ` [PATCH] push: warn users about updating existing tags on push Dave Olszewski
2010-08-30  8:03         ` Junio C Hamano
2010-08-30 16:38           ` Dave Olszewski
2010-08-30 21:20             ` Junio C Hamano
2010-09-01  3:51         ` Tay Ray Chuan
2010-09-01 15:18           ` 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=7veidd7aqo.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=cxreg@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=rctay89@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).