Re: branch name in remote.<remote>.push is not updated after "git branch -m"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrey Borzenkov <arvidjaar@xxxxxxxxx> 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@xxxxxxxxxx: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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]