Re: [stgit PATCH] commands.{new,rename}: verify patch names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 5, 2010 at 1:45 PM, Max Kellermann <max@xxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]