[PATCH] nmbug: only push master branch on nmbug push
Tomi Ollila
tomi.ollila at iki.fi
Sat Feb 9 16:56:22 PST 2013
On Sun, Feb 10 2013, Jani Nikula <jani at nikula.org> wrote:
> 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 at nmbug.tethera.net:nmbug-tags
> ! [rejected] config -> config (non-fast-forward)
> error: failed to push some refs to 'nmbug at 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.
> ---
LGTM.
Tomi
> contrib/nmbug/nmbug | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/nmbug/nmbug b/contrib/nmbug/nmbug
> index f003ef9..fe103b3 100755
> --- a/contrib/nmbug/nmbug
> +++ b/contrib/nmbug/nmbug
> @@ -331,7 +331,7 @@ sub do_log {
> sub do_push {
> my $remote = shift || 'origin';
>
> - git ('push', $remote);
> + git ('push', $remote, 'master');
> }
>
>
> --
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list