]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Rcs/git.pm
* If gitorigin_branch is set to the empty string, don't push or pull.
[git.ikiwiki.info.git] / IkiWiki / Rcs / git.pm
index 8f75399f86262334d41c443dbe001969b54e5b23..c436deb4da0ab7334ac087ca318ac41b2847fa72 100644 (file)
@@ -285,7 +285,9 @@ sub git_sha1 (;$) { #{{{
 sub rcs_update () { #{{{
        # Update working directory.
 
-       run_or_cry('git-pull', $config{gitorigin_branch});
+       if (length $config{gitorigin_branch}) {
+               run_or_cry('git-pull', $config{gitorigin_branch});
+       }
 } #}}}
 
 sub rcs_prepedit ($) { #{{{
@@ -335,7 +337,9 @@ sub rcs_commit ($$$;$$) { #{{{
        $message = possibly_foolish_untaint($message);
        if (run_or_non('git-commit', '-m', $message, '-i', $file)) {
                unlockwiki();
-               run_or_cry('git-push', $config{gitorigin_branch});
+               if (length $config{gitorigin_branch}) {
+                       run_or_cry('git-push', $config{gitorigin_branch});
+               }
        }
 
        return undef; # success