aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-22 01:47:30 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-22 01:47:30 +0000
commit3613f72a3bf0f4548b736c4ab36508d17ca47c21 (patch)
treeb0f44c660b56e0cc8fe0ec894e3130d71f89f095 /IkiWiki/Rcs
parent691c503c1fc18d0b92a346a626d3d56345d86e27 (diff)
downloadikiwiki-3613f72a3bf0f4548b736c4ab36508d17ca47c21.tar
ikiwiki-3613f72a3bf0f4548b736c4ab36508d17ca47c21.tar.gz
* If gitorigin_branch is set to the empty string, don't push or pull.
Useful for laptop clones of remote wikis.
Diffstat (limited to 'IkiWiki/Rcs')
-rw-r--r--IkiWiki/Rcs/git.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 8f75399f8..c436deb4d 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -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