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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]