Re: Random thoughts on "upstream"
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 18, 2013, 22:33 UTC
- Message-ID
- <CAMP44s1Rv1zobP99z6dNKhSXgBgvWa+1-BZL-Pi1HWo3vrK6vw@mail.gmail.com>
- In-Reply-To
- <CALkWK0kYKZGhthdrb6-7RD_c2A7E9rscAZU3=JHM-4rYre6w=Q@mail.gmail.com>
On Sat, May 18, 2013 at 1:27 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 14 quoted lines
> Junio C Hamano wrote: >> Having said that I am not sure where your "not overly fond of" comes >> from, as I do not see a problem with branch.<name>.push. The only >> problem I may have with the approach would arise _only_ if we make >> it the sole way to allow people push to different names, forcing >> people who want to push N branches to configure it N times. Other >> than that, I think it is an acceptable solution to give per-branch >> control. > > It doesn't strike me as being elegant at all. > > [branch "hot-branch"] > remote = ram > push = refs/heads/for-junio/hot-branch
s/remote/pushremote/
> 1. I git branch -M for-each-ref and push. Screwed.
Can't parse that.
Show 9 quoted lines
> 2. Let's say you give me the thumbs up to write hot-branch to origin. > Excitedly, I change the remote to origin. Now I already have push > semantics for origin (you obviously want me to write to rr/, so I can > cooperate with others): > > [remote "origin"] > push = refs/heads/*:refs/heads/rr/* > > Unfortunately, it doesn't kick in unless I change branch.<name>.push.
If course it doesn't that's what you told git to do. Of course, you could simply do:
% git branch --set-downstream-to origin/rr/for-junio/hot-branch
Or if you are going to push multiple branches and set a 'remote.<name>.push':
% git branch --unset-downstream
Show 7 quoted lines
> I guess what I'm saying is: refspec semantics are inherent properties > of the remote, not of the local branch. Since there is no > intermediate refs/remotes/* sitting between the remote and local > branches, this is _not_ like branch.<name>.merge at all. That is why > I'm tiling towards remote.<name>.push: we're not giving up any > functionality anyway; there's nothing we can't do without > branch.<name>.push.
Yes there is, I thought you already acknowledged that:
% git branch --set-downstream-to github/fc/master % git rebase -i @{downstream}
-- Felipe Contreras