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

Re: [BUG] Possible bug in `remote set-url --add --push`

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 15, 2013, 06:22 UTC
Message-ID
<7vpq1755jb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1D472234-A0A5-4F02-878D-D05DEE995FCD@gmail.com>
Jardel Weyrich <jweyrich@gmail.com> writes:
> If you allow me, I'd like you to forget about the concepts for a minute, and focus on the user experience.
> Imagine a simple hypothetical scenario in which the user wants to push to 2 distinct repositories. He already has cloned the repo from the 1st repository, thus (theoretically) all he needs to do, is to add a new repository for push. He then uses `remote set-url --add --push <2nd-repo>` (which I personally thought would suffice). However, if he tries to push a new commit to this remote, it would be pushed _only_ to the 2nd-repo.
The primary reason behind push-url was that
 (1) usually you push to and fetch from the same, so no pushUrl is
     ever needed, just a single Url will do (this is often true for
     cvs/svn style shared repository workflow); and
 (2) sometimes you want to fetch from one place and push to another
     (this is often true for "fetch from upstream, push to my own
     and ask upstream to pull from it" workflow), and in that case
     you want pushUrl in addition to Url.  Most importantly, in this
     case, you do *NOT* want to push to Url.  You only push to
     pushUrl.

Setting *one* pushURL is a way to say "That URL I fetch from is *not* the place I want to push (I may not even be able to push there); when I say 'push', push there instead". Your proposed semantics will make it impossible to arrange such an asymmetric setting.

Previous: Jardel WeyrichNext: Junio C Hamano
Message 11 of 27 in “[BUG] Possible bug in `remote set-url --add --push`”
  1. Jardel WeyrichJan 12, 2013
  2. Junio C HamanoJan 12, 2013
  3. Jardel WeyrichJan 12, 2013
  4. Junio C HamanoJan 12, 2013
  5. Sascha CunzJan 12, 2013
  6. Jardel WeyrichJan 12, 2013
  7. Michael J GruberJan 14, 2013
  8. Jonathan NiederJan 14, 2013
  9. Junio C HamanoJan 14, 2013
  10. Jardel WeyrichJan 15, 2013
  11. Junio C HamanoJan 15, 2013
  12. Junio C HamanoJan 15, 2013
  13. Michael J GruberJan 15, 2013
  14. Junio C HamanoJan 15, 2013
  15. Michael J GruberJan 16, 2013
  16. Junio C HamanoJan 16, 2013
  17. Michael J GruberJan 16, 2013
  18. Andreas SchwabJan 16, 2013
  19. Junio C HamanoJan 16, 2013
  20. git-remote: distinguish between default and configured URLsMichael J Gruber, Jan 16, 2013
  21. Michael J GruberJan 16, 2013
  22. John KeepingJan 16, 2013
  23. Michael J GruberJan 16, 2013
  24. John KeepingJan 16, 2013
  25. Junio C HamanoJan 16, 2013
  26. Phil HordJan 16, 2013
  27. Michael J GruberJan 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.