git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/7] check_ref_format(): tighten refname rules
Date: Sun, 22 Mar 2009 16:19:21 -0700	[thread overview]
Message-ID: <7vocvtb0xy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0903221539060.10279@pacific.mpi-cbg.de> (Johannes Schindelin's message of "Sun, 22 Mar 2009 15:41:11 +0100 (CET)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Sat, 21 Mar 2009, Junio C Hamano wrote:
>
>> Yes, I know that tightening rules retroactively is bad, but this changes 
>> the rules for refnames to forbid:
>
> Tightening rules retroactively is not only bad (if sometimes necessary), 
> but tightening rules without giving the user a chance to recover is really 
> bad.
>
> 'git branch -m' uses check_ref_format() to check the old name.

Because "git branch -d" still allows a malformed funny branch to be
removed with this patch, I would say it is Ok as long as release notes
clearly says what we are tightening the rule for.

It is very probable that some people may have "master@{24}" in their
repositories, but such a branch cannot be accessed with or without this
patch anyway, and it is unlikely they created it because they wanted to.

"git branch wtf-dot wtf." followed by "git branch -d wtf." also works; for
this one, it might make sense to allow "git branch -m" to rename it, but
I do not think it is worth it.

      reply	other threads:[~2009-03-22 23:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 22:13 [PATCH 0/7] Clean up interpret_nth_last_branch feature Junio C Hamano
2009-03-21 22:13 ` [PATCH 1/7] check_ref_format(): tighten refname rules Junio C Hamano
2009-03-21 22:13   ` [PATCH 2/7] Rename interpret/substitute nth_last_branch functions Junio C Hamano
2009-03-21 22:13     ` [PATCH 3/7] check-ref-format --branch: give Porcelain a way to grok branch shorthand Junio C Hamano
2009-03-21 22:13       ` [PATCH 4/7] strbuf_branchname(): a wrapper for branch name shorthands Junio C Hamano
2009-03-21 22:13         ` [PATCH 5/7] Fix "branch -m @{-1} newname" Junio C Hamano
2009-03-21 22:13           ` [PATCH 6/7] strbuf_check_branch_ref(): a helper to check a refname for a branch Junio C Hamano
2009-03-21 22:13             ` [PATCH 7/7] checkout -: make "-" to mean "previous branch" everywhere Junio C Hamano
2009-03-22  0:58               ` [PATCH 7/7 (v2)] " Junio C Hamano
2009-03-22 10:18       ` [PATCH 3/7] check-ref-format --branch: give Porcelain a way to grok branch shorthand Bert Wesarg
2009-03-22 21:58         ` Junio C Hamano
2009-03-21 23:15   ` [PATCH 1/7] check_ref_format(): tighten refname rules Junio C Hamano
2009-03-22 14:41   ` Johannes Schindelin
2009-03-22 23:19     ` 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=7vocvtb0xy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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).