<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-parse-remote(1)">
<articleinfo>
    <title>git-parse-remote(1)</title>
        <indexterm>
                <primary>git-parse-remote(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-parse-remote - Routines to help parsing remote repository access parameters</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<simpara><emphasis>. "$(git --exec-path)/git-parse-remote"</emphasis></simpara>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>This script is included in various scripts to supply
routines to parse files under $GIT_DIR/remotes/ and
$GIT_DIR/branches/ and configuration variables that are related
to fetching, pulling and pushing.</simpara>
<simpara>The primary entry points are:</simpara>
<variablelist>
<varlistentry>
<term>
get_remote_refs_for_fetch
</term>
<listitem>
<simpara>
        Given the list of user-supplied <literal>&lt;repo&gt; &lt;refspec&gt;&#8230;</literal>,
        return the list of refs to fetch after canonicalizing
        them into <literal>$GIT_DIR</literal> relative paths
        (e.g. <literal>refs/heads/foo</literal>).  When <literal>&lt;refspec&gt;&#8230;</literal> is empty
        the returned list of refs consists of the defaults
        for the given <literal>&lt;repo&gt;</literal>, if specified in
        <literal>$GIT_DIR/remotes/</literal>, <literal>$GIT_DIR/branches/</literal>, or <literal>remote.*.fetch</literal>
        configuration.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
get_remote_refs_for_push
</term>
<listitem>
<simpara>
        Given the list of user-supplied <literal>&lt;repo&gt; &lt;refspec&gt;&#8230;</literal>,
        return the list of refs to push in a form suitable to be
        fed to the <emphasis>git-send-pack</emphasis> command.  When <literal>&lt;refspec&gt;&#8230;</literal>
        is empty the returned list of refs consists of the
        defaults for the given <literal>&lt;repo&gt;</literal>, if specified in
        <literal>$GIT_DIR/remotes/</literal>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Written by Junio C Hamano.</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
