summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 352404a)
raw | patch | inline | side by side (parent: 352404a)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Thu, 4 Aug 2011 04:36:18 +0000 (06:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Aug 2011 22:53:16 +0000 (15:53 -0700) |
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/check-attr.c | patch | blob | history |
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 3016d29caa610caf4618e9bc1684a532fd3a18a1..5f04126d4d542d3e6f79439eeacc8081b345f7f0 100644 (file)
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
};
static void check_attr(int cnt, struct git_attr_check *check,
- const char** name, const char *file)
+ const char *file)
{
int j;
if (git_checkattr(file, cnt, check))
value = "unspecified";
quote_c_style(file, NULL, stdout, 0);
- printf(": %s: %s\n", name[j], value);
+ printf(": %s: %s\n", git_attr_name(check[j].attr), value);
}
}
-static void check_attr_stdin_paths(int cnt, struct git_attr_check *check,
- const char** name)
+static void check_attr_stdin_paths(int cnt, struct git_attr_check *check)
{
struct strbuf buf, nbuf;
int line_termination = null_term_line ? 0 : '\n';
die("line is badly quoted");
strbuf_swap(&buf, &nbuf);
}
- check_attr(cnt, check, name, buf.buf);
+ check_attr(cnt, check, buf.buf);
maybe_flush_or_die(stdout, "attribute to stdout");
}
strbuf_release(&buf);
}
if (stdin_paths)
- check_attr_stdin_paths(cnt, check, argv);
+ check_attr_stdin_paths(cnt, check);
else {
for (i = doubledash; i < argc; i++)
- check_attr(cnt, check, argv, argv[i]);
+ check_attr(cnt, check, argv[i]);
maybe_flush_or_die(stdout, "attribute to stdout");
}
return 0;