All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] attr: explain the lack of attr-name syntax check in parse_attr()
@ 2016-05-15 22:58 Junio C Hamano
  0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2016-05-15 22:58 UTC (permalink / raw)
  To: git


Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 attr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/attr.c b/attr.c
index 94b27f4..aac5c8f 100644
--- a/attr.c
+++ b/attr.c
@@ -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++;
-- 
2.8.2-748-gfb85f76

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-15 22:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-15 22:58 [PATCH] attr: explain the lack of attr-name syntax check in parse_attr() Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.