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

Re: [PATCH 5/5] builtin-remote: Make "remote -v" display push urls

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 9, 2009, 16:25 UTC
Message-ID
<7vvdn5nzmb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1244563298-15479-6-git-send-email-git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 11 quoted lines
> Example with "mjg" having 1 url and 1 pushurl, "origin" having 3 urls,
> sb having 1 url:
>
> mjg     git://repo.or.cz/git/mjg.git (fetch)
> mjg     repoor:/srv/git/git/mjg.git (push)
> origin  git://repo.or.cz/git.git (fetch)
> origin  git://repo.or.cz/git.git (push)
> origin  git://git2.kernel.org/pub/scm/git/git.git (push)
> origin  git://repo.or.cz/alt-git.git (push)
> sb      git://repo.or.cz/git/sbeyer.git (fetch)
> sb      git://repo.or.cz/git/sbeyer.git (push)

The readers will get distracted, saying "eh, git:// can be used for push?" (and the answer is "yes, sometimes, but not for repo.or.cz") even though that is not the point of these illustrations. For these examles, I think it is better to use "repo.or.cz:foo.git" style, instead of "git://".

I am debating myself if the last two should be just one line, without "(fetch)" nor "(push)" tacked at the end, like this:

        sb     git://repo.or.cz/git/sbeyer.git

If we change the rule in your patch to format a remote.*.url used for both push and fetch as a single line to achieve this, however, it would make your "origin" example come out like this instead:

	origin git://repo.or.cz/git.git
        origin git://git.kernel.org/pub/scm/git/git.git (push)
        origin git://repo.or.cz/alt-git.git (push)

which is arguably better (one less line) and worse (it is unclear if the top one is only for fetching) at the same time.

Or perhaps we could go with something like this.
	origin git://repo.or.cz/git.git (fetch/push)
        origin git://git.kernel.org/pub/scm/git/git.git (push)
        origin git://repo.or.cz/alt-git.git (push)
        sb     git://repo.or.cz/git/sbeyer.git

i.e. make the rule such that a URL used for both are shown with (fetch/push) only if there are other lines for the same remote.

Hmm?
Previous: Michael J GruberNext: Michael J Gruber
Message 7 of 15 in “Allow push and fetch urls to be different”
  1. 0/5 Allow push and fetch urls to be differentMichael J Gruber, Jun 9, 2009
  2. 1/5 Allow push and fetch urls to be differentMichael J Gruber, Jun 9, 2009
  3. 2/5 t5516: Check pushurl config settingMichael J Gruber, Jun 9, 2009
  4. 3/5 technical/api-remote: Describe new struct remote member pushurlMichael J Gruber, Jun 9, 2009
  5. 4/5 builtin-remote: Show push urls as wellMichael J Gruber, Jun 9, 2009
  6. 5/5 builtin-remote: Make "remote -v" display push urlsMichael J Gruber, Jun 9, 2009
  7. Junio C HamanoJun 9, 2009
  8. Michael J GruberJun 9, 2009
  9. Junio C HamanoJun 9, 2009
  10. 0/5 builtin-remote: Make "remote -v" display push urlsMichael J Gruber, Jun 13, 2009
  11. 4/5 builtin-remote: Show push urls as wellMichael J Gruber, Jun 13, 2009
  12. 5/5 builtin-remote: Make "remote -v" display push urlsMichael J Gruber, Jun 13, 2009
  13. Junio C HamanoJun 14, 2009
  14. Bert WesargJun 9, 2009
  15. Michael J GruberJun 9, 2009

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.