summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 35d5ae6)
raw | patch | inline | side by side (parent: 35d5ae6)
author | Stephan Beyer <s-beyer@gmx.net> | |
Fri, 16 Jan 2009 19:10:01 +0000 (20:10 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Jan 2009 01:16:44 +0000 (17:16 -0800) |
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c | patch | blob | history |
diff --git a/run-command.c b/run-command.c
index 49810a835e8977d8c90a07cc5b965658e87fa0c4..fc54c07a932dbefe39ea98e4cfbb4a15d158b70d 100644 (file)
--- a/run-command.c
+++ b/run-command.c
int ret;
int i;
+ if (access(git_path("hooks/%s", name), X_OK) < 0)
+ return 0;
+
va_start(args, name);
argv[0] = git_path("hooks/%s", name);
i = 0;
} while (argv[i]);
va_end(args);
- if (access(argv[0], X_OK) < 0)
- return 0;
-
memset(&hook, 0, sizeof(hook));
hook.argv = argv;
hook.no_stdin = 1;