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

getting an interpreted remote url for script use

From
Chris Packham <judge.packham@gmail.com>
Date
Aug 6, 2010, 17:19 UTC
Message-ID
<4C5C442C.9080201@gmail.com>
Hi,

I have a script that sends an email to a developer when someone applies their patch (I know there are other server-side hooks that can be used for this, but there are infrastructure reasons why these can't be used easily).

Among other things my script tries to take the URL of the remote and convert it to a http URL that is pointing to our internal server running gitweb. The conversion is a simple s|ssh://|http://to-gitweb|

At the moment the script parses the output of 'git remote show origin' to get the URL which was a bad idea to start with and has subsequently been broken by changes in the show output (specifically the display of Pull and Fetch URLs).

I think I should be doing is using 'git config remote.origin.url' to get the URL but the problem with that is if someone has setup a URL alias then I get the URL prior to the interpreting of that alias. Is there any way for me to get the interpreted remote URL?

Thanks, Chris

Message 1 of 1 in “getting an interpreted remote url for script use”
  1. Chris PackhamAug 6, 2010

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.