Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
attr.c: explain the lack of attr-name syntax check in parse_attr()
author
Junio C Hamano
<gitster@pobox.com>
Sat, 28 Jan 2017 02:01:44 +0000
(18:01 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 1 Feb 2017 21:46:52 +0000
(13:46 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
4894f4f
)
diff --git
a/attr.c
b/attr.c
index 007f1a29954b590c5c3f046006e40d88b731aaa4..6b55a57ef7fd9471a762ffdfb883fb2a7bedf4e2 100644
(file)
--- 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++;