]> sipb.mit.edu Git - ikiwiki.git/commitdiff
git: explicitly specify the branch to push to origin
authorSimon McVittie <smcv@debian.org>
Fri, 21 Feb 2014 11:23:17 +0000 (11:23 +0000)
committerSimon McVittie <smcv@debian.org>
Fri, 21 Feb 2014 16:39:17 +0000 (16:39 +0000)
git's behaviour when doing "git push origin" is configurable, and the
default is going to change in 2.0. In particular, if you've set
push.default to "nothing", the regression test will warn:

fatal: You didn't specify any refspecs to push, and push.default
is "nothing".
'git push origin' failed:  at .../lib/IkiWiki/Plugin/git.pm line 220.

IkiWiki/Plugin/git.pm

index 77c0678bcbd8dfd32c13b164477ea899d0c9f38a..96a9727e934812d59117ed57ea6094048399052a 100644 (file)
@@ -609,7 +609,7 @@ sub rcs_commit_helper (@) {
        # So we should ignore its exit status (hence run_or_non).
        if (run_or_non('git', 'commit', '-m', $params{message}, '-q', @opts)) {
                if (length $config{gitorigin_branch}) {
        # So we should ignore its exit status (hence run_or_non).
        if (run_or_non('git', 'commit', '-m', $params{message}, '-q', @opts)) {
                if (length $config{gitorigin_branch}) {
-                       run_or_cry('git', 'push', $config{gitorigin_branch});
+                       run_or_cry('git', 'push', $config{gitorigin_branch}, $config{gitmaster_branch});
                }
        }
        
                }
        }