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

Re: Random thoughts on "upstream"

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 17, 2013, 12:43 UTC
Message-ID
<CALkWK0=rHFQ14G8baYpY7gYo+Qb+5a0qOKZGBTrp6BamKC2vRg@mail.gmail.com>
In-Reply-To
<7vzjvu1jes.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Actually, I suspect that you shouldn't even need to do that
> pros-and-cons analysis, because the 'single' thing should cover as a
> natural extension of the existing infrastructure.  You should only
> need to have something like this:

Which is the exact argument I presented on the other thread. However, Felipe has a point: we shouldn't cripple @{f} (I think "fork" is a good name for it) in the name of generality. Think of what remote.<name>.push and branch.<name>.push are actually going to be used for:

remote.<name>.push are most probably going to be used with wildcards (like in the Gerrit case): I don't mind if @{f} is not able to tell me where my branch will go (and it's probably even a pseudo-ref, in which case the answer is really meaningless). The limitation doesn't affect remote.<name>.fetch, because @{u} only operates between remote branches and local branches, not at the ref-mapping level.

branch.<name>.push cannot be used with wildcards, and @{f} is pretty straightforward to determine in this case. When the information is easily available for end-user consumption, why would we _not_ want to expose it by stuffing branch.<name>.push into remote.<name>.push configuration?

So, I think the way forward is:
1. Introduce @{f[ork]} to show $(branch.<name>.pushremote or
remote.pushdefault)/$(HEAD).  We can update 'git status' to show this
information as well: the ahead/ behind with @{f} is no less important.
2. (optional) Make remote.<name>.fetch non-mandatory.  Currently, a
lot of git-core breaks unless this is present, and this is an annoying
wart.
3. Introduce remote.<name>.push.  Make it clear that it is intended
for the Gerrit-user.  @{f} cannot be determined with this [*1*].
4. Introduce branch.<name>.push for a branch-specific override to
remote.<name>.push.  @{f} can be determined when this is in effect.
[Footnotes]

*1* Do we want to do some magic wildcard-expansion to get/set @{f} anyway? In which case, branch.<name>.push is really not necessary. Which approach is less ugly?

Previous: Felipe ContrerasNext: Junio C Hamano
Message 8 of 26 in “Random thoughts on "upstream"”
  1. Junio C HamanoMay 16, 2013
  2. Felipe ContrerasMay 16, 2013
  3. Junio C HamanoMay 16, 2013
  4. Felipe ContrerasMay 17, 2013
  5. Junio C HamanoMay 17, 2013
  6. Felipe ContrerasMay 17, 2013
  7. Felipe ContrerasMay 17, 2013
  8. Ramkumar RamachandraMay 17, 2013
  9. Junio C HamanoMay 17, 2013
  10. Ramkumar RamachandraMay 17, 2013
  11. Junio C HamanoMay 17, 2013
  12. Ramkumar RamachandraMay 18, 2013
  13. Ramkumar RamachandraMay 18, 2013
  14. Felipe ContrerasMay 18, 2013
  15. Felipe ContrerasMay 18, 2013
  16. Junio C HamanoMay 19, 2013
  17. Ramkumar RamachandraMay 19, 2013
  18. Felipe ContrerasMay 19, 2013
  19. Ramkumar RamachandraMay 19, 2013
  20. Felipe ContrerasMay 19, 2013
  21. Junio C HamanoMay 20, 2013
  22. Ramkumar RamachandraMay 23, 2013
  23. Felipe ContrerasMay 23, 2013
  24. Junio C HamanoMay 23, 2013
  25. Ramkumar RamachandraMay 23, 2013
  26. Ramkumar RamachandraMay 24, 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.