All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ben Boeckel <mathstuf@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] add ls-remote --get-push-url option
Date: Fri, 31 Jul 2015 12:16:46 -0700	[thread overview]
Message-ID: <xmqqzj2c3zoh.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150731190415.GA23674@megas.kitware.com> (Ben Boeckel's message of "Fri, 31 Jul 2015 15:04:15 -0400")

Ben Boeckel <mathstuf@gmail.com> writes:

> On Fri, Jul 31, 2015 at 12:02:14 -0700, Junio C Hamano wrote:
>> Ben Boeckel <mathstuf@gmail.com> 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.

  reply	other threads:[~2015-07-31 19:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:38 [PATCH] add ls-remote --get-push-url option Ben Boeckel
2015-07-31 17:38 ` [PATCH] ls-remote: add " Ben Boeckel
2015-07-31 18:40 ` [PATCH] add ls-remote " Junio C Hamano
2015-07-31 18:56   ` Ben Boeckel
2015-07-31 19:02     ` Junio C Hamano
2015-07-31 19:04       ` Ben Boeckel
2015-07-31 19:16         ` Junio C Hamano [this message]
2015-07-31 20:51           ` Ben Boeckel
2015-08-03 21:00 ` [PATCH v2] add git-url subcommand Ben Boeckel
2015-08-03 21:00 ` [PATCH v2] remote: add get-url subcommand Ben Boeckel
2015-08-03 23:38   ` Eric Sunshine
2015-08-04  0:16     ` Ben Boeckel
2015-08-04  0:45       ` Eric Sunshine
2015-08-04 14:56 ` [PATCH v3] " Ben Boeckel
2015-08-05 20:34   ` Junio C Hamano
2015-08-05 21:33     ` Ben Boeckel
2015-08-05 21:39       ` Junio C Hamano
2015-09-04 14:30 ` [PATCH v4] " Ben Boeckel
2015-09-04 22:40   ` Junio C Hamano
2015-09-16  1:53 ` [PATCH v5] " Ben Boeckel
2015-09-16 22:51   ` Junio C Hamano
2015-09-17  0:19 ` [PATCH v6] " Ben Boeckel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzj2c3zoh.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mathstuf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.