diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-28 11:54:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-28 14:40:17 -0700 |
commit | 44f7f1ebd2a0a9f41cbd8d417ba3e94fe3821b9c (patch) | |
tree | f6da9cf877f7e3eb2b6f3f96d2188f8f906bd210 | |
parent | c77ada7f108856054b62f6f08682ae3b8d35a76c (diff) | |
download | git-44f7f1ebd2a0a9f41cbd8d417ba3e94fe3821b9c.tar.gz |
attr.c: explain the lack of attr-name syntax check in parse_attr()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
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++; |