aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-09-29 08:56:16 +0000
committerGerrit Code Review <gerrit@localhost>2024-09-29 08:56:16 +0000
commit289e7a6b5a84c64142a10bdd875f8a06e3987579 (patch)
treeed431802ae10ab0fc30e7327a202b0898561589f /doc
parentf12b60273b7e93184dd175ef9daa75ec490cbd5e (diff)
parent04daff94e347c03e466577c8c00414f03e27a96f (diff)
Merge "libfetchers/git: restore compat with `builtins.fetchGit` from 2.3" into main
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/rl-next/fetchGit-regression.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/manual/rl-next/fetchGit-regression.md b/doc/manual/rl-next/fetchGit-regression.md
new file mode 100644
index 000000000..f6b4fb9e5
--- /dev/null
+++ b/doc/manual/rl-next/fetchGit-regression.md
@@ -0,0 +1,23 @@
+---
+synopsis: restore backwards-compatibility of `builtins.fetchGit` with Nix 2.3
+issues: [5291, 5128]
+credits: [ma27]
+category: Fixes
+---
+
+Compatibility with `builtins.fetchGit` from Nix 2.3 has been restored as follows:
+
+* Until now, each `ref` was prefixed with `refs/heads` unless it starts with `refs/` itself.
+
+ Now, this is not done if the `ref` looks like a commit hash.
+
+* Specifying `builtins.fetchGit { ref = "a-tag"; /* … */ }` was broken because `refs/heads` was appended.
+
+ Now, the fetcher doesn't turn a ref into `refs/heads/ref`, but into `refs/*/ref`. That way,
+ the value in `ref` can be either a tag or a branch.
+
+* The ref resolution happens the same way as in git:
+
+ * If `refs/ref` exists, it's used.
+ * If a tag `refs/tags/ref` exists, it's used.
+ * If a branch `refs/heads/ref` exists, it's used.