ostree/man/ostree-pull.xml
Colin Walters 42c60effbe pull: Support specifying exact commit to pull via branch@commit
I don't know why we didn't do this a long time ago.  This extends the
pull API to allow grabbing a specific commit, and will set the branch
to it.  There's some support for this in the deploy engine, but there
are a lot of reasons to support it for raw pulls (such as subset
mirroring cases).

In fact I'm thinking we should also have the override-version logic
here too.

NOTE: One thing I debated here is inventing a new syntax on the
command line.  Git doesn't seem to have this functionality (probably
because it'd be rarely used). The '@' character at least doesn't
conflict with anything.

Anyways, I wanted this for some other test cases.  Without this,
writing tests that go between different commits is more awkward as one
must generate the content in one repo, then pull downstream, then
generate more content, then pull again.  But now I can just keep track
of commit IDs and do exactly what I want without synchronizing the
tests.
2016-02-14 10:12:26 -05:00

148 lines
4.6 KiB
XML

<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
Copyright 2014 Anne LoVerso <anne.loverso@students.olin.edu>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<refentry id="ostree">
<refentryinfo>
<title>ostree pull</title>
<productname>OSTree</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Colin</firstname>
<surname>Walters</surname>
<email>walters@verbum.org</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>ostree pull</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>ostree-pull</refname>
<refpurpose>Download data from a remote repository</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>ostree pull <arg choice="req">REMOTE</arg> <arg choice="opt">BRANCH</arg></command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>--commit-metadata-only</option></term>
<listitem><para>
Fetch only the commit metadata.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--disable-fsync</option></term>
<listitem><para>
Do no invoke fsync().
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--disable-static-deltas</option></term>
<listitem><para>
Do not use static deltas.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--mirror</option></term>
<listitem><para>
Write refs suitable for a mirror.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--subpath</option>=SUBPATH</term>
<listitem><para>
Only pull the provided subpath.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--depth</option>=DEPTH</term>
<listitem><para>
Traverse DEPTH parents (-1=infinite) (default: 0).
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
This command can retrieve just a specific commit, or go all
the way to performing a full mirror of the remote
repository. If no <literal>BRANCH</literal> is specified,
all branches are retrieved.
</para>
<para>
A special syntax in the <literal>@</literal> character allows
specifying a specific commit to retrieve from a branch. This
</para>
</refsect1>
<refsect1>
<title>Example</title>
<para><command>$ ostree --repo=repo pull --depth=-1 --mirror remote_name</command></para>
<para>Perform a complete mirror of the remote. (This is
likely most useful if your repository is also
<literal>archive-z2</literal> mode)</para>
<para><command>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard</command></para>
<para>Fetch the most recent commit to <literal>exampleos/x86_64/standard</literal>.</para>
<para><command>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard@98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4</command></para>
<para>Download the specific commit starting with
<literal>98ea6e</literal> as if it was the latest commit for
<literal>exampleos/x86_64/standard</literal>.</para>
</refsect1>
</refentry>