Re: [PATCH] add ls-remote --get-push-url option

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

 



Ben Boeckel <mathstuf@xxxxxxxxx> writes:

> On Fri, Jul 31, 2015 at 12:02:14 -0700, Junio C Hamano wrote:
>> Ben Boeckel <mathstuf@xxxxxxxxx> writes:
>> 
>> > With some sed, yes, but then so would `git remote show` just as useful
>> > too (and in that case, "why does --get-url exist either?" comes to
>> > mind).
>> 
>> Either carelessness let it slip in, or it came before 'git remote show'.
>
> Would adding `git remote show --url $remote` and `git remote show
> --push-url $remote` be acceptable?

It is not just acceptable; I think "git remote" is a much better
place to have something like that.

Or even "git remote get url [$there]", "git remote get push-url [$there]".

Or to mirror the existing "ls-remote --get-url [$there]", which directly asks
"where does this request go if I run it without '--get-url' option?":

    $ git push --get-url [$there [$refspec...]]
    $ git push --get-refspec [$there [$refspec...]]

might be a better option.  The logic in "push" takes the current
branch and configurations like branch.*.remote and push.default into
account, so it is likely that you will get the exact information
without too much code.

I am not opposed to having a scriptable interface to obtain these
pieces of information.  I was only objecting to teach ls-remote
anything about push, which ls-remote does not have anything to do
with.

--
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]