From: Junio C Hamano <gitster@pobox.com>
To: Andrey Borzenkov <arvidjaar@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: branch name in remote.<remote>.push is not updated after "git branch -m"
Date: Tue, 22 Jan 2013 08:59:23 -0800 [thread overview]
Message-ID: <7v622pb1ck.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130122164306.3dc8b757@opensuse.site> (Andrey Borzenkov's message of "Tue, 22 Jan 2013 16:43:06 +0400")
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.
prev parent reply other threads:[~2013-01-22 16:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v622pb1ck.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=arvidjaar@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).