summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e37a7e)
raw | patch | inline | side by side (parent: 9e37a7e)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Thu, 4 Aug 2011 04:36:27 +0000 (06:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Aug 2011 22:53:19 +0000 (15:53 -0700) |
This will make the code easier to refactor.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 |
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index d0042227c219d4e595cf73059af28318da7f3b66..de3fef734846e8d9e6f7de2709546fe1a22c866b 100644 (file)
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
{
struct git_attr_check *check;
int cnt, i, doubledash, filei;
- const char *errstr = NULL;
argc = parse_options(argc, argv, prefix, check_attr_options,
check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
}
if (cnt <= 0)
- errstr = "No attribute specified";
- else if (stdin_paths && filei < argc)
- errstr = "Can't specify files with --stdin";
- if (errstr) {
- error_with_usage(errstr);
- }
+ error_with_usage("No attribute specified");
+
+ if (stdin_paths && filei < argc)
+ error_with_usage("Can't specify files with --stdin");
check = xcalloc(cnt, sizeof(*check));
for (i = 0; i < cnt; i++) {