git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: git@vger.kernel.org
Subject: getting an interpreted remote url for script use
Date: Fri, 06 Aug 2010 10:19:40 -0700	[thread overview]
Message-ID: <4C5C442C.9080201@gmail.com> (raw)

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

                 reply	other threads:[~2010-08-06 17:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4C5C442C.9080201@gmail.com \
    --to=judge.packham@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).