Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-01-28 05:02:04 +0300
committerJunio C Hamano <gitster@pobox.com>2017-02-02 00:46:53 +0300
commite810e0635767afbc9b304d5256fbdb26b59644fa (patch)
tree22565ccc823a22ec95e1bf937a7a8150bf52c79f /builtin/check-attr.c
parent60a12722ac80bc55b43581a7719d25d1bb7a9882 (diff)
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]);