<refentry id="man.gbp.export.orig">
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;
    </author>
  </refentryinfo>
  <refmeta><refentrytitle>gbp-export-orig</refentrytitle>
    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>gbp-export-orig</refname>
    <refpurpose>Export upstream tarballs from a &git; repository</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      &gbp-export-orig;
      <arg><option>--verbose</option></arg>
      <arg><option>--color=</option>[auto|on|off]</arg>
      <arg><option>--color-scheme</option>=<replaceable>COLOR_SCHEME</replaceable></arg>
      <arg><option>--upstream-branch=</option><replaceable>BRANCH_NAME</replaceable></arg>
      <arg><option>--[no-]submodules</option></arg>
      <arg><option>--upstream-tag=</option><replaceable>tag-format</replaceable></arg>
      <arg><option>--upstream-tree=</option><replaceable>[TAG|BRANCH|TREEISH]</replaceable></arg>
      <arg><option>--tarball-dir=</option><replaceable>DIRECTORY</replaceable></arg>
      <arg><option>--force-create</option></arg>
      <arg><option>--compression=</option><replaceable>TYPE</replaceable></arg>
      <arg><option>--compression-level=</option><replaceable>LEVEL</replaceable></arg>
      <arg rep='repeat'><option>--component=</option><replaceable>component</replaceable></arg>
      <arg><option>--[no-]pristine-tar</option></arg>
      <arg><option>--[no-]pristine-tar-commit</option></arg>
      <arg><option>--upstream-signatures=</option>[auto|on|off]</arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      &gbp-export-orig; is used to export upstream tarballs from a
      &git; repository. Usually upstream tarballs are created by
      &gbp-buildpackage; when needed but if you don't want to perform
      a build you can use this command.
    </para>
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term><option>--verbose</option>
        </term>
        <listitem>
          <para>
          verbose execution
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--color=</option>[auto|on|off]
        </term>
        <listitem>
          <para>
          Whether to use colored output.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--color-scheme</option>=<replaceable>COLOR_SCHEME</replaceable>
        </term>
        <listitem>
          <para>
          Colors to use in output (when color is enabled). The format for
          COLOR_SCHEME is
          '&lt;debug&gt;:&lt;info&gt;:&lt;warning&gt;:&lt;error&gt;'.
          Numerical values and color names are accepted, empty fields imply
          the default color. For example --color-scheme='cyan:34::' would
          show debug messages in cyan, info messages in blue and other messages
          in default (i.e. warning and error messages in red).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--upstream-branch</option>=<replaceable>BRANCH_NAME</replaceable>
        </term>
        <listitem>
          <para>
          Branch to build the orig tarball from if
          <option>--upstream-tree</option> is set to
          <replaceable>BRANCH</replaceable>. Default is
          <replaceable>upstream</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--[no-]submodules</option>
        </term>
        <listitem>
          <para>
          Include git submodules in the orig tarball.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--upstream-tag=</option><replaceable>TAG-FORMAT</replaceable>
        </term>
        <listitem>
          <para>
          Use this tag format when looking for tags of upstream versions,
          default is <replaceable>upstream/%(version)s</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--force-create</option>
        </term>
        <listitem>
          <para>
          Force creation of an orig tarball (overwriting a pre-existing one if
          present).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--upstream-tree=</option><replaceable>[BRANCH|TAG|TREEISH]</replaceable>
        </term>
        <listitem>
          <para>
          How to find the upstream sources used to generate the tarball.
          <replaceable>TAG</replaceable> (the default) looks at a tag corresponding to the
          version in the changelog. <replaceable>BRANCH</replaceable> looks at
          the upstream branch given via the
          <option>--upstream-branch</option> option.
	  </para>
	  <para>
	  Other values are interpreted as treeishs.
          </para>
          <para>
          This doesn't have any effect if <option>--pristine-tar</option>
          is being used.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--tarball-dir=</option><replaceable>DIRECTORY</replaceable>
        </term>
        <listitem>
          <para>
          Search for original tarballs in <replaceable>DIRECTORY</replaceable>
          instead of generating them.
          <replaceable>DIRECTORY</replaceable> can contain a version format
          substitution pattern, eg: <replaceable>foo-%(version)s</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--compression=</option><replaceable>TYPE</replaceable>
        </term>
        <listitem>
          <para>
          Specifies the upstream tarball compression type. This will be used to
          locate and build the upstream tarball if necessary. The default is
          <replaceable>auto</replaceable> which derives the compression type
          from the pristine-tar branch if available and falls back to gzip
          otherwise. Other options are <replaceable>gzip</replaceable>,
          <replaceable>bzip2</replaceable>, <replaceable>lzma</replaceable> and
          <replaceable>xz</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--compression-level=</option><replaceable>LEVEL</replaceable>
        </term>
        <listitem>
          <para>
          Specifies the upstream tarball compression level if an upstream
          tarball needs to be built.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--component=</option><replaceable>COMPONENT</replaceable>
        </term>
        <listitem>
          <para>
            When generating tarballs create an additional original
            tarball of directory <replaceable>COMPONENT</replaceable>
            in the source tree. Using additional original tarballs is
            a feature of the 3.0 (quilt) source format. See
            the <command>dpkg-source</command> manpage for details. Note that the
            <replaceable>--pristine-tar-commit</replaceable>
            option is currently incompatible with this option.
            </para>
            <para>
              This is considered an experimental feature and might
              change incompatibly.
            </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--pristine-tar</option>
        </term>
        <listitem>
          <para>
          Use pristine-tar when generating the upstream tarball if it doesn't
          exist.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--pristine-tar-commit</option>
        </term>
        <listitem>
          <para>
            Commit the pristine-tar delta to the pristine-tar branch if a new
            tarball was generated and the pristine-tar data isn't already there.
          </para>
        </listitem>
      </varlistentry>
    <varlistentry>
        <term><option>--upstream-signatures=</option>[auto|on|off]
        </term>
        <listitem>
          <para>
          Whether to export with upstream signatures.
          </para>
        </listitem>
    </varlistentry>
  </variablelist>
  </refsect1>
  <refsect1>
    <title>EXAMPLES</title>
    <para>
      Generate an upstream tarball of the version currently referenced
      in the changelog using &pristine-tar;:
    </para>
    <screen>
      &gbp-export-orig; --pristine-tar
    </screen>
    <para>
      Same as above but generate and additional tarball for
      directory <filename>foo</filename>.
    </para>
    <screen>
      &gbp-export-orig; --pristine-tar --component=foo
    </screen>
  </refsect1>
  <refsect1>
    &man.gbp.config-files;
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>
    <para>
    <xref linkend="man.gbp.buildpackage"/>,
    <xref linkend="man.gbp.import.orig"/>,
    <xref linkend="man.gbp.pristine.tar"/>,
    <xref linkend="man.gbp.conf"/>,
    &man.seealso.common;
    </para>
  </refsect1>
  <refsect1>
    <title>AUTHOR</title>
    <para>
    &dhusername; &dhemail;
    </para>
  </refsect1>
</refentry>
