git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Gustav Hållberg" <gustav@gmail.com>
To: Max Kellermann <max@duempel.org>
Cc: git@vger.kernel.org
Subject: Re: [stgit PATCH] commands.{new,rename}: verify patch names
Date: Tue, 5 Oct 2010 14:44:43 +0200	[thread overview]
Message-ID: <AANLkTin9PyfY+-1=mJKMZa2FJ5YC2D27iPtiocCWY+eP@mail.gmail.com> (raw)
In-Reply-To: <20101005114541.15037.53617.stgit@woodpecker.blarg.de>

On Tue, Oct 5, 2010 at 1:45 PM, Max Kellermann <max@duempel.org> wrote:
> +def check_patch_name(name):
> +    """Checks if the specified name is a valid patch name. For
> +    technical reasons, we cannot allow a slash and other characters."""
> +    return len(name) > 0 and name[0] != '.' and re.search(r'[\x00-\x20]', name) is None

I don't quite understand how the above would filter out slashes.

There are also other types of names that won't work correctly in git,
such as names starting with (double?) hyphens.

Does anyone know if it's explicitly documented anywhere which types of
names are (meant to be) allowed for git refs?
Note that you can create refs with names that don't actually work
correctly; e.g.,

 sh$ git tag -- --foo
 sh$ git rev-parse --foo
 <failure>

- Gustav

  reply	other threads:[~2010-10-05 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 11:45 [stgit PATCH] commands.{new,rename}: verify patch names Max Kellermann
2010-10-05 12:44 ` Gustav Hållberg [this message]
2010-10-05 12:52   ` Max Kellermann
  -- strict thread matches above, loose matches on Subject: below --
2010-10-05 12:56 Max Kellermann
2010-11-03  2:43 ` Shinya Kuribayashi

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTin9PyfY+-1=mJKMZa2FJ5YC2D27iPtiocCWY+eP@mail.gmail.com' \
    --to=gustav@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=max@duempel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).