Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-check-attr: Extract a function output_attr()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Thu, 4 Aug 2011 04:36:24 +0000
(06:36 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 4 Aug 2011 22:53:18 +0000
(15:53 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/check-attr.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ee548df
)
diff --git
a/builtin/check-attr.c
b/builtin/check-attr.c
index 5f04126d4d542d3e6f79439eeacc8081b345f7f0..384c5a6171c0e8ff0c705b5dda299e068477ab3a 100644
(file)
--- a/
builtin/check-attr.c
+++ b/
builtin/check-attr.c
@@
-20,12
+20,10
@@
static const struct option check_attr_options[] = {
OPT_END()
};
OPT_END()
};
-static void
check
_attr(int cnt, struct git_attr_check *check,
+static void
output
_attr(int cnt, struct git_attr_check *check,
const char *file)
{
int j;
const char *file)
{
int j;
- if (git_checkattr(file, cnt, check))
- die("git_checkattr died");
for (j = 0; j < cnt; j++) {
const char *value = check[j].value;
for (j = 0; j < cnt; j++) {
const char *value = check[j].value;
@@
-41,6
+39,14
@@
static void check_attr(int cnt, struct git_attr_check *check,
}
}
}
}
+static void check_attr(int cnt, struct git_attr_check *check,
+ const char *file)
+{
+ if (git_checkattr(file, cnt, check))
+ die("git_checkattr died");
+ output_attr(cnt, check, file);
+}
+
static void check_attr_stdin_paths(int cnt, struct git_attr_check *check)
{
struct strbuf buf, nbuf;
static void check_attr_stdin_paths(int cnt, struct git_attr_check *check)
{
struct strbuf buf, nbuf;