diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-14 16:48:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-16 13:55:02 -0700 |
commit | 7566f4dc1290058438356bd5ed4ad3517b2e9c6e (patch) | |
tree | bb1d117b8c0ac135f230f06b438be9219624590b | |
parent | 642c6f2ae0840ef9625f924d0e3e6c14504b8e09 (diff) | |
download | git-7566f4dc1290058438356bd5ed4ad3517b2e9c6e.tar.gz |
attr.c: explain the lack of attr-name syntax check in parse_attr()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | attr.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -183,6 +183,12 @@ static const char *parse_attr(const char *src, int lineno, const char *cp, return NULL; } } else { + /* + * As this function is always called twice, once with + * e == NULL in the first pass and then e != NULL in + * the second pass, no need for invalid_attr_name() + * check here. + */ if (*cp == '-' || *cp == '!') { e->setto = (*cp == '-') ? ATTR__FALSE : ATTR__UNSET; cp++; |