mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
builtins.fetchGit: document absolute ref support
This commit is contained in:
parent
7e35e914c1
commit
c8205a3413
3 changed files with 38 additions and 0 deletions
|
@ -419,6 +419,13 @@ stdenv.mkDerivation { … }
|
|||
This is often a branch or tag name. Defaults to
|
||||
<literal>HEAD</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, the <varname>ref</varname> value is prefixed
|
||||
with <literal>refs/heads/</literal>. As of Nix 2.3.0
|
||||
Nix will not prefix <literal>refs/heads/</literal> if
|
||||
<varname>ref</varname> starts with <literal>refs/</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -432,6 +439,14 @@ stdenv.mkDerivation { … }
|
|||
}</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Fetching an arbitrary ref</title>
|
||||
<programlisting>builtins.fetchGit {
|
||||
url = "https://gitub.com/NixOS/nix.git";
|
||||
ref = "refs/heads/0.5-release";
|
||||
}</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Fetching a repository's specific commit on an arbitrary branch</title>
|
||||
<para>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</partintro>
|
||||
-->
|
||||
|
||||
<xi:include href="rl-2.3.xml" />
|
||||
<xi:include href="rl-2.2.xml" />
|
||||
<xi:include href="rl-2.1.xml" />
|
||||
<xi:include href="rl-2.0.xml" />
|
||||
|
|
22
doc/manual/release-notes/rl-2.3.xml
Normal file
22
doc/manual/release-notes/rl-2.3.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ssec-relnotes-2.3">
|
||||
|
||||
<title>Release 2.3 (????-??-??)</title>
|
||||
|
||||
<para>This release contains the following changes:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para><function>builtins.fetchGit</function>'s <varname>ref</varname>
|
||||
argument now allows specifying an absolute remote ref.
|
||||
Nix will automatically prefix <varname>ref</varname> with
|
||||
<literal>refs/heads</literal> only if <varname>ref</varname> doesn't
|
||||
already begin with <literal>refs/</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
Loading…
Reference in a new issue