aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/blogc-git-receiver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/blogc-git-receiver.c b/src/blogc-git-receiver.c
index ffeac61..084a778 100644
--- a/src/blogc-git-receiver.c
+++ b/src/blogc-git-receiver.c
@@ -282,8 +282,12 @@ cleanup:
static int
git_post_receive_hook(int argc, char *argv[])
{
- if (0 != system("git remote get-url --push mirror &> /dev/null"))
- return 0;
+ if (0 != system("git config remote.mirror.pushurl &> /dev/null")) {
+ if (0 != system("git config remote.mirror.url &> /dev/null")) {
+ fprintf(stderr, "warning: repository mirroring disabled\n");
+ return 0;
+ }
+ }
// at this point we know that we have a remote called mirror, we can just
// push to it.