diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2015-07-22 14:05:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-27 09:21:15 -0700 |
commit | 53a8555ee4db43534990126a14f0840f92aff898 (patch) | |
tree | 3b963e64c94375b02b4a029d30a60805d0cb37fe /refs.c | |
parent | bb3e7b1a5505bae590b0d85a3995a61d6dd82547 (diff) | |
download | git-53a8555ee4db43534990126a14f0840f92aff898.tar.gz |
refs: cleanup comments regarding check_refname_component()
Correctly specify all characters which are rejected under the '4: a
bad character' disposition, which did not list all characters that
are treated as such.
Cleanup comment style for rejected refs by inserting a ", or" at the
end of each statement.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -20,7 +20,8 @@ struct ref_lock { * 1: End-of-component * 2: ., look for a preceding . to reject .. in refs * 3: {, look for a preceding @ to reject @{ in refs - * 4: A bad character: ASCII control characters, "~", "^", ":" or SP + * 4: A bad character: ASCII control characters, and + * "*", ":", "?", "[", "\", "^", "~", SP, or TAB */ static unsigned char refname_disposition[256] = { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, @@ -71,10 +72,11 @@ static unsigned char refname_disposition[256] = { * * - any path component of it begins with ".", or * - it has double dots "..", or - * - it has ASCII control character, "~", "^", ":" or SP, anywhere, or - * - it ends with a "/". - * - it ends with ".lock" - * - it contains a "\" (backslash) + * - it has ASCII control characters, or + * - it has "*", ":", "?", "[", "\", "^", "~", SP, or TAB anywhere, or + * - it ends with a "/", or + * - it ends with ".lock", or + * - it contains a "@{" portion */ static int check_refname_component(const char *refname, int flags) { |