]> git.notmuchmail.org Git - notmuch/commitdiff
nmbug: only push master branch on nmbug push
authorJani Nikula <jani@nikula.org>
Sat, 9 Feb 2013 22:49:00 +0000 (00:49 +0200)
committerDavid Bremner <bremner@debian.org>
Thu, 14 Feb 2013 11:57:05 +0000 (07:57 -0400)
nmbug pull only merges upstream master, but nmbug push tries to push
all local branches. The asymmetry results in conflicts whenever there
have been changes in the config branch in the origin:

$ nmbug push
To nmbug@nmbug.tethera.net:nmbug-tags
 ! [rejected]        config -> config (non-fast-forward)
error: failed to push some refs to 'nmbug@nmbug.tethera.net:nmbug-tags'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration
hint: variable to 'current' or 'upstream' to push only the current branch.
'git push origin' exited with nonzero value

To fix this, only push the master branch on nmbug push. Any config
changes need to be done manually via git anyway.

contrib/nmbug/nmbug

index f003ef9e355fe7446aa49a89f3f7e03e6582c04d..fe103b3b7c5ac2794733e3cff3f2e2ffbb4901f4 100755 (executable)
@@ -331,7 +331,7 @@ sub do_log {
 sub do_push {
   my $remote = shift || 'origin';
 
 sub do_push {
   my $remote = shift || 'origin';
 
-  git ('push', $remote);
+  git ('push', $remote, 'master');
 }
 
 
 }