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

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

From
Ben Boeckel <mathstuf@gmail.com>
Date
Jul 31, 2015, 18:56 UTC
Message-ID
<20150731185619.GA24622@megas.kitware.com>
In-Reply-To
<xmqqfv445fxv.fsf@gitster.dls.corp.google.com>
On Fri, Jul 31, 2015 at 11:40:12 -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Probably get-url makes (some) sense because ls-remote is a "fetch
> that does not actually fetch anything".  But "get-push-url" to
> ls-remote makes _no_ sense whatsoever.  ls-remote and fetch do not
> have to know or care about push-url; they do not even have to know
> there exists a thing called "git push" ;-)
> 
> Wouldn't "git push -v -n" or something suit your needs already?

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).

Our use case is that we have some scripts which setup the project with the right remotes and such. To do this, we detect if your remotes are set up properly already and not ask if things are OK already. This is currently done with git config --get remote.$x.pushurl, but `pushInsteadOf` is not expanded and causes false positives.

Where would a utility to have git expand its `pushInsteadOf` aliases make more sense? Being right beside `insteadOf` expansion made sense to me (certainly more than some locations for certain flags and actions, but that boat sailed long ago :) ).

--Ben
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 22 in “add ls-remote --get-push-url option”
  1. add ls-remote --get-push-url optionBen Boeckel, Jul 31, 2015
  2. ls-remote: add --get-push-url optionBen Boeckel, Jul 31, 2015
  3. Junio C HamanoJul 31, 2015
  4. Ben BoeckelJul 31, 2015
  5. Junio C HamanoJul 31, 2015
  6. Ben BoeckelJul 31, 2015
  7. Junio C HamanoJul 31, 2015
  8. Ben BoeckelJul 31, 2015
  9. add git-url subcommandBen Boeckel, Aug 3, 2015
  10. remote: add get-url subcommandBen Boeckel, Aug 3, 2015
  11. Eric SunshineAug 3, 2015
  12. Ben BoeckelAug 4, 2015
  13. Eric SunshineAug 4, 2015
  14. remote: add get-url subcommandBen Boeckel, Aug 4, 2015
  15. Junio C HamanoAug 5, 2015
  16. Ben BoeckelAug 5, 2015
  17. Junio C HamanoAug 5, 2015
  18. remote: add get-url subcommandBen Boeckel, Sep 4, 2015
  19. Junio C HamanoSep 4, 2015
  20. remote: add get-url subcommandBen Boeckel, Sep 16, 2015
  21. Junio C HamanoSep 16, 2015
  22. remote: add get-url subcommandBen Boeckel, Sep 17, 2015

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.