remote-curl: allow push options
[gitweb.git] / run-command.c
index 73bfba7ef94e678afa830550199f14b6f5ca5ad0..5227f78aeaae7e76bfc85d4d7ca2886b2b52215e 100644 (file)
@@ -871,8 +871,14 @@ const char *find_hook(const char *name)
 
        strbuf_reset(&path);
        strbuf_git_path(&path, "hooks/%s", name);
-       if (access(path.buf, X_OK) < 0)
+       if (access(path.buf, X_OK) < 0) {
+#ifdef STRIP_EXTENSION
+               strbuf_addstr(&path, STRIP_EXTENSION);
+               if (access(path.buf, X_OK) >= 0)
+                       return path.buf;
+#endif
                return NULL;
+       }
        return path.buf;
 }