summaryrefslogtreecommitdiff
path: root/builtin/check-attr.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-01-27 18:02:04 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-02-01 13:46:53 -0800
commite810e0635767afbc9b304d5256fbdb26b59644fa (patch)
tree22565ccc823a22ec95e1bf937a7a8150bf52c79f /builtin/check-attr.c
parentattr: remove maybe-real, maybe-macro from git_attr (diff)
downloadtgif-e810e0635767afbc9b304d5256fbdb26b59644fa.tar.xz
attr: tighten const correctness with git_attr and match_attr
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-attr.c')
-rw-r--r--builtin/check-attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 40cdff13e9..4d01ca0c8b 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -166,7 +166,8 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
check = attr_check_alloc();
if (!all_attrs) {
for (i = 0; i < cnt; i++) {
- struct git_attr *a = git_attr(argv[i]);
+ const struct git_attr *a = git_attr(argv[i]);
+
if (!a)
return error("%s: not a valid attribute name",
argv[i]);