{"thread":{"id":"24648","subject":"getting an interpreted remote url for script use","startedAt":"2010-08-06T17:19:40Z","lastAt":"2010-08-06T17:19:40Z","messageCount":1,"participants":["Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147329","messageId":"4C5C442C.9080201@gmail.com","threadId":"24648","inReplyTo":null,"subject":"getting an interpreted remote url for script use","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-08-06T17:19:40Z","receivedAt":"2010-08-06T17:19:40Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nI have a script that sends an email to a developer when someone applies\ntheir patch (I know there are other server-side hooks that can be used\nfor this, but there are infrastructure reasons why these can't be used\neasily).\n\nAmong other things my script tries to take the URL of the remote and\nconvert it to a http URL that is pointing to our internal server running\ngitweb. The conversion is a simple s|ssh://|http://to-gitweb|\n\nAt the moment the script parses the output of 'git remote show origin'\nto get the URL which was a bad idea to start with and has subsequently\nbeen broken by changes in the show output (specifically the display of\nPull and Fetch URLs).\n\nI think I should be doing is using 'git config remote.origin.url' to get\nthe URL but the problem with that is if someone has setup a URL alias\nthen I get the URL prior to the interpreting of that alias. Is there any\nway for me to get the interpreted remote URL?\n\nThanks,\nChris\n"}]}