git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 3/3] push: add separate 'downstream' branch

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 16, 2013, 09:33 UTC
Message-ID
<CAMP44s2vsD2uwFoL5_79m05gtqyKLN9wHX8Yrhtn0kT4LVULxQ@mail.gmail.com>
In-Reply-To
<CALkWK0nOywB5BtHnKZQ_+wsJNp82zk7-YJw_S15quqH+iU=jWg@mail.gmail.com>

On Thu, May 16, 2013 at 4:20 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 12 quoted lines
> Felipe Contreras wrote:
>> And is going to change soon.
>
> Your point being?  How will this patch interact with push.default = matching?
>
>>> branch.<name>.push should probably be named
>>> branch.<name>.downstreamref and be used only for informational
>>> purposes (@{d} and git status)?
>>
>> That makes absolutely no sense.
>
> I said downstreamref, not downstreamrefspec.

That's not consistent with branch.A.merge, which is not named branch.A.upstreamref.

Show 19 quoted lines
>> [branch "master"]
>>           remote = origin
>>           merge = refs/heads/master
>>           pushremote = github
>>           push = refs/heads/fc/master
>>
>> [branch "fc/old-remote/hg"]
>>           remote = .
>>           merge = refs/heads/master
>>           pushremote = github
>>           push = refs/heads/fc/remote/hg
>>
>> Tell me how you express that without 'remote.branch.push'.
>
> [remote "origin"]
>     push = refs/heads/master:refs/heads/fc/master
>
> [remote "."]
>     push = refs/heads/fc/old-remote/hg:refs/heads/fc/remote/hg
Let's see:

% git checkout master % git push

It will try to push to 'origin/fc/master' not 'github/fc/master', which is what I intended.

% git checkout fc/old-remote/hg % git push

It will try to push to 'fc/remote/hg' not 'github/fc/remote/hg', which is what I intended.

Show 6 quoted lines
> Advantage being you can do:
>
> [remote "origin"]
>     push = refs/heads/*:refs/for/*
>
> While you can't with branch.<name>.push.

But I can do 'git push origin "refs/head/*:refs/heads/for/*"', not that I've ever had the need to do something like that, so I don't care.

-- 
Felipe Contreras
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 22 of 28 in “New kind of upstream branch: downstream branch”
  1. 0/3 New kind of upstream branch: downstream branchFelipe Contreras, May 16, 2013
  2. 1/3 remote: don't override default if cur head remote is '.'Felipe Contreras, May 16, 2013
  3. 2/3 pull: trivial cleanupsFelipe Contreras, May 16, 2013
  4. Ramkumar RamachandraMay 16, 2013
  5. Felipe ContrerasMay 16, 2013
  6. Ramkumar RamachandraMay 16, 2013
  7. Felipe ContrerasMay 16, 2013
  8. Ramkumar RamachandraMay 16, 2013
  9. Felipe ContrerasMay 16, 2013
  10. Ramkumar RamachandraMay 16, 2013
  11. Felipe ContrerasMay 16, 2013
  12. Antoine PelisseMay 16, 2013
  13. Felipe ContrerasMay 16, 2013
  14. 3/3 push: add separate 'downstream' branchFelipe Contreras, May 16, 2013
  15. Junio C HamanoMay 16, 2013
  16. Felipe ContrerasMay 16, 2013
  17. Junio C HamanoMay 16, 2013
  18. Junio C HamanoMay 16, 2013
  19. Ramkumar RamachandraMay 16, 2013
  20. Felipe ContrerasMay 16, 2013
  21. Ramkumar RamachandraMay 16, 2013
  22. Felipe ContrerasMay 16, 2013
  23. Ramkumar RamachandraMay 16, 2013
  24. Felipe ContrerasMay 16, 2013
  25. Ramkumar RamachandraMay 16, 2013
  26. Felipe ContrerasMay 16, 2013
  27. Ramkumar RamachandraMay 16, 2013
  28. Felipe ContrerasMay 16, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.