]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* If gitorigin_branch is set to the empty string, don't push or pull.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 22 Oct 2007 01:47:30 +0000 (01:47 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 22 Oct 2007 01:47:30 +0000 (01:47 +0000)
  Useful for laptop clones of remote wikis.

IkiWiki/Rcs/git.pm
debian/changelog

index 8f75399f86262334d41c443dbe001969b54e5b23..c436deb4da0ab7334ac087ca318ac41b2847fa72 100644 (file)
@@ -285,7 +285,9 @@ sub git_sha1 (;$) { #{{{
 sub rcs_update () { #{{{
        # Update working directory.
 
 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 ($) { #{{{
 } #}}}
 
 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();
        $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
        }
 
        return undef; # success
index 03c308831e45cb96906a80614ed076b9ab369f68..196de0b7a1d03a8e264e4aa93fd6460682d05144 100644 (file)
@@ -1,8 +1,10 @@
 ikiwiki (2.11) UNRELEASED; urgency=low
 
   * Correct a pair of logic errors that triggered if svnpath was empty.
 ikiwiki (2.11) UNRELEASED; urgency=low
 
   * Correct a pair of logic errors that triggered if svnpath was empty.
+  * If gitorigin_branch is set to the empty string, don't push or pull.
+    Useful for laptop clones of remote wikis.
 
 
- -- Joey Hess <joeyh@debian.org>  Sun, 21 Oct 2007 18:49:40 -0400
+ -- Joey Hess <joeyh@debian.org>  Sun, 21 Oct 2007 20:28:16 -0400
 
 ikiwiki (2.10) unstable; urgency=low
 
 
 ikiwiki (2.10) unstable; urgency=low