diff options
| author | Michael Forney <mforney@mforney.org> | 2016-06-18 19:10:00 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-06-18 19:10:00 -0700 |
| commit | f987e7c7439fd4521f7b833d0d3c176dd4ef93a3 (patch) | |
| tree | 58987972dc27178b5d6405849ada8e67d489bbb6 | |
| parent | 4169cee9e1805855bdc8dd7503f6f8c96f73b2bc (diff) | |
perms-hook: Make sure we are running in a git repository
| -rw-r--r-- | util/perms-hook.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/perms-hook.c b/util/perms-hook.c index 177d09f0..c256fcdf 100644 --- a/util/perms-hook.c +++ b/util/perms-hook.c @@ -330,8 +330,10 @@ int main(int argc, char *argv[]) { exit(2); } + if (stat(".git", &st) < 0) + die("stat .git:"); if (stat(".", &st) < 0) - die("stat:"); + die("stat .:"); rootdev = st.st_dev; if (old) |
