From 3613f72a3bf0f4548b736c4ab36508d17ca47c21 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 22 Oct 2007 01:47:30 +0000 Subject: * If gitorigin_branch is set to the empty string, don't push or pull. Useful for laptop clones of remote wikis. --- IkiWiki/Rcs/git.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Rcs') 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 -- cgit v1.2.3