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

Re: Random thoughts on "upstream"

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 23, 2013, 10:53 UTC
Message-ID
<CAMP44s22V9gETtjpMutmcO9_v1YnwnicAE=3zQfbyPXgUeKmKw@mail.gmail.com>
In-Reply-To
<CALkWK0m1x_qrJfQ2Xw3w_kVuM-JHERFukbfxHyR08ODvxysKzw@mail.gmail.com>

On Thu, May 23, 2013 at 5:42 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 45 quoted lines
> Junio C Hamano wrote:
>> And that was done with extensivility your example implied in mind:
>> you may later be allowed to push other branches as well to origin.
>> That is why the refspec definition for 'origin' does not hardcode
>> the name of the branch you are permitted to push there at this
>> moment.  The fact that hot-branch goes to origin is encapsulated in
>> the branch.hot-branch.pushremote.  The rule, under which the name of
>> any branch that goes to the origin is renamed, is encapsulated in
>> remote.origin.push refspec (the introduction of the new mode
>> "push.default = single" is necessary to make this work).
>
> My problem with this entire scheme _is_ the magic push.default =
> single.  Currently, push.default only kicks in when no
> remote.<name>.push refspec is specified (in other words, it is a
> default value of remote.<name>.push for all remotes), and I don't
> think we should change this.  If the user wants to configure the push
> refspec (either for rewriting, or for determining what to push), there
> is exactly one thing to change: remote.<name>.push.  So I can have:
>
> [remote "theodore"]
>     push = master
>     push = +pu
>
> This means that I will always push master without force and pu with
> force, irrespective of the branch I'm on.
>
> [remote "origin"]
>     push = refs/heads/*:refs/heads/rr/*
>
> This means that I will always push all branches without force with
> rewriting, irrespective of the branch I'm on.
>
> [remote "ram"]
>     push = HEAD:refs/heads/rr/%1
>
> This means that I will always push the current branch without force,
> with rewriting.
>
> [remote "felipe"]
>      # empty
>
> This means that remote."felipe".push falls back to the refspec
> specified by push.default.
>
> Isn't branch.<name>.push is completely unnecessary?

No, it's not; 'git push --set-downstream' is not going to configure that for the user. Nor will the user be able to see the downstream with 'git branch -vv', nor will the user be able to see the downstream with 'git rev-parse branch@{downstream}'.

You keep ignoring those use-cases I already mentioned multiple times because they don't fit your idealistic model.

-- 
Felipe Contreras
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 23 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.