{"thread":{"id":"32691","subject":"branch name in remote.<remote>.push is not updated after \"git branch -m\"","startedAt":"2013-01-22T12:43:06Z","lastAt":"2013-01-22T16:59:23Z","messageCount":2,"participants":["Andrey Borzenkov","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"207508","messageId":"20130122164306.3dc8b757@opensuse.site","threadId":"32691","inReplyTo":null,"subject":"branch name in remote.<remote>.push is not updated after \"git branch -m\"","fromName":"Andrey Borzenkov","fromEmail":"arvidjaar@gmail.com","sentAt":"2013-01-22T12:43:06Z","receivedAt":"2013-01-22T12:43:06Z","isPatch":false,"sender":{"key":"arvidjaar@gmail.com","avatar":null},"body":"I renamed branches and noticed that branch name was not changed in\nremote push config. I.e. after\n\nbor@opensuse:~/src/bootinfoscript> git branch -m github master\n\nI still have\n\n[remote \"github\"]\n        push = github:master\n        url = git://github.com/arvidjaar/bootinfoscript.git\n        pushurl = git@github.com:arvidjaar/bootinfoscript.git\n        fetch = +refs/heads/*:refs/remotes/github/*\n\nIs it expected behavior or possibly already fixed?\n\nbor@opensuse:~> git --version\ngit version 1.7.10.4\n\nTIA\n\n-andrey\n"},{"id":"207513","messageId":"7v622pb1ck.fsf@alter.siamese.dyndns.org","threadId":"32691","inReplyTo":"20130122164306.3dc8b757@opensuse.site","subject":"Re: branch name in remote.<remote>.push is not updated after \"git branch -m\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-01-22T16:59:23Z","receivedAt":"2013-01-22T16:59:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrey Borzenkov <arvidjaar@gmail.com> writes:\n\n> I renamed branches and noticed that branch name was not changed in\n> remote push config. I.e. after\n>\n> bor@opensuse:~/src/bootinfoscript> git branch -m github master\n>\n> I still have\n>\n> [remote \"github\"]\n>         push = github:master\n>         url = git://github.com/arvidjaar/bootinfoscript.git\n>         pushurl = git@github.com:arvidjaar/bootinfoscript.git\n>         fetch = +refs/heads/*:refs/remotes/github/*\n>\n> Is it expected behavior or possibly already fixed?\n\nIsn't that line added manually by you?\n\nIf the line were written in a canonical and an explicit way\n(i.e. \"push = refs/heads/github:refs/heads/master\"), it might be\nnicer if \"git branch -m\" noticed it and adjusted the LHS of the\nrefspec, but even that is dubious.\n\nThe move of the old github to master by the user may well have been\nbecause the user realized that he added something that is not ready\nto be pushed out to the branch, and the next move by the end user\ncould be to create a github branch anew that points at an earlier\npart of the history that is ready to be pushed, while keeping the\ninvariant \"my local github branch is what I will publish\".\n\nSo, in short, it is expected, and no, I do not think changing it to\n\"push = master:master\" is necessarily an improvement.\n"}]}