<?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-vcs-*(1)">
<articleinfo>
    <title>git-vcs-*(1)</title>
        <indexterm>
                <primary>git-vcs-*(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-vcs-* - Helper programs for interoperation with foreign systems</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<simpara><emphasis>git vcs-&lt;system&gt;</emphasis> &lt;command&gt; [options] [arguments]</simpara>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>These programs are normally not used directly by end users, but are
invoked by various git programs that interact with remote repositories
when the repository they would operate on is part of a foreign
system.</simpara>
<simpara>Each <emphasis>git vcs-&lt;system&gt;</emphasis> is a helper for interoperating with a
particular version control system. Different helpers have different
capabilities (limited both be the particular helper and by the
capabilities of the system they connect to), and they report what
capabilities they support.</simpara>
<simpara>In general, these programs interact with a portion of the refs
namespace that isn&#8217;t used by the rest of git. The configuration will
then (generally) map these refs into the remotes namespace. This
allows the importer to do whatever it wants with its refs without
affecting the state visible to normal git programs.</simpara>
</simplesect>
<simplesect id="_commands">
<title>COMMANDS</title>
<variablelist>
<varlistentry>
<term>
<emphasis>capabilities</emphasis>
</term>
<listitem>
<simpara>
        Prints the capabilities of the helper, one per line. These are:
</simpara>
<itemizedlist>
<listitem>
<simpara>
import: the basic import command
</simpara>
</listitem>
<listitem>
<simpara>
marks: import should be done with a saved marks file
</simpara>
</listitem>
<listitem>
<simpara>
find-new-branches: detect new branches
</simpara>
</listitem>
<listitem>
<simpara>
export: the general export command
</simpara>
</listitem>
<listitem>
<simpara>
fork: create a new branch and export to it
</simpara>
</listitem>
<listitem>
<simpara>
anonymous-fork: make commits on a branch without an inherent name
</simpara>
</listitem>
<listitem>
<simpara>
merge: merge branches (of whatever type the system supports)
</simpara>
<literallayout class="monospaced">If the helper doesn't support "merge", the default for pull is
to rebase instead of merging.</literallayout>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>list</emphasis>
</term>
<listitem>
<simpara>
        Takes the remote name, and outputs the names of refs. These
        may be followed, after a single space, by "changed" or
        "unchanged", indicating whether the foreign repository has
        changed from the state in the ref. If the helper doesn&#8217;t know,
        it doesn&#8217;t have to provide a value. (In particular, it
        shouldn&#8217;t do expensive operations, such as importing the
        content, to see whether it matches.)
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>import</emphasis>
</term>
<listitem>
<simpara>
        Takes the remote name and a list of names of refs, and imports
        whatever it describes, by outputting it in git-fast-import
        format.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>export</emphasis>
</term>
<listitem>
<simpara>
        Sends the branch to the foreign system and reimports it in
        fast-import format.
</simpara>
<literallayout class="monospaced">Reads a list of commits from stdin, where each commit has no
parents which were neither produced by an earlier import nor
appearing earlier in the list, where some commit has the old
value of the branch as a parent, and where all commits listed
are ancestors of the last one. Furthermore:</literallayout>
<itemizedlist>
<listitem>
<simpara>
if the system doesn&#8217;t support merges, each of these commits
           has only a single parent;
</simpara>
</listitem>
<listitem>
<simpara>
if the system doesn&#8217;t support anonymous branches, the first
           commit has the old value of the branch as a parent (if the
           branch already had a value), and all parents are either the
           commit listed immediately before or produced by an earlier
           import;
</simpara>
</listitem>
<listitem>
<simpara>
if the system doesn&#8217;t support many-way merges, each commit
           has at most two parents.
</simpara>
<literallayout class="monospaced">export produces output in fast-import format giving the
content after a round-trip through the foreign system. This
also contains extra headers to report the mapping of original
git commits to reimported git commits (to facilitate rewriting
local branches to use the history-as-reimported instead of the
git-only version).</literallayout>
<literallayout class="monospaced">export reports how much it managed to export by producing
commits in the fast-import stream that replace the listed
items that were successfully exported.</literallayout>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
</article>
