git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* branch name in remote.<remote>.push is not updated after "git branch -m"
@ 2013-01-22 12:43 Andrey Borzenkov
  2013-01-22 16:59 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2013-01-22 12:43 UTC (permalink / raw
  To: git

I renamed branches and noticed that branch name was not changed in
remote push config. I.e. after

bor@opensuse:~/src/bootinfoscript> git branch -m github master

I still have

[remote "github"]
        push = github:master
        url = git://github.com/arvidjaar/bootinfoscript.git
        pushurl = git@github.com:arvidjaar/bootinfoscript.git
        fetch = +refs/heads/*:refs/remotes/github/*

Is it expected behavior or possibly already fixed?

bor@opensuse:~> git --version
git version 1.7.10.4

TIA

-andrey

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: branch name in remote.<remote>.push is not updated after "git branch -m"
  2013-01-22 12:43 branch name in remote.<remote>.push is not updated after "git branch -m" Andrey Borzenkov
@ 2013-01-22 16:59 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2013-01-22 16:59 UTC (permalink / raw
  To: Andrey Borzenkov; +Cc: git

Andrey Borzenkov <arvidjaar@gmail.com> writes:

> I renamed branches and noticed that branch name was not changed in
> remote push config. I.e. after
>
> bor@opensuse:~/src/bootinfoscript> git branch -m github master
>
> I still have
>
> [remote "github"]
>         push = github:master
>         url = git://github.com/arvidjaar/bootinfoscript.git
>         pushurl = git@github.com:arvidjaar/bootinfoscript.git
>         fetch = +refs/heads/*:refs/remotes/github/*
>
> Is it expected behavior or possibly already fixed?

Isn't that line added manually by you?

If the line were written in a canonical and an explicit way
(i.e. "push = refs/heads/github:refs/heads/master"), it might be
nicer if "git branch -m" noticed it and adjusted the LHS of the
refspec, but even that is dubious.

The move of the old github to master by the user may well have been
because the user realized that he added something that is not ready
to be pushed out to the branch, and the next move by the end user
could be to create a github branch anew that points at an earlier
part of the history that is ready to be pushed, while keeping the
invariant "my local github branch is what I will publish".

So, in short, it is expected, and no, I do not think changing it to
"push = master:master" is necessarily an improvement.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-22 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 12:43 branch name in remote.<remote>.push is not updated after "git branch -m" Andrey Borzenkov
2013-01-22 16:59 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).