diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2024-05-30 13:04:48 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2024-09-28 14:52:06 +0200 |
commit | 04daff94e347c03e466577c8c00414f03e27a96f (patch) | |
tree | 7d3031f940a5b2501fabe3866436ac82fa1957a2 /src/libexpr/pos-idx.hh | |
parent | 14dc84ed03f1b7e5a41bb6fdce00916faab32b60 (diff) |
libfetchers/git: restore compat with `builtins.fetchGit` from 2.3
Since fb38459d6e58508245553380cccc03c0dbaa1542, each `ref` is appended
with `refs/heads` unless it starts with `refs/` already. This regressed
two use-cases that worked fine before:
* Specifying a commit hash as `ref`: now, if `ref` looks like a commit
hash it will be directly passed to `git fetch`.
* Specifying a tag without `refs/tags` as prefix: now, the fetcher prepends
`refs/*` to a ref that doesn't start with `refs/` and doesn't look
like a commit hash. That way, both a branch and a tag specified in
`ref` can be fetched.
The order of preference in git is
* file in `refs/` (e.g. `HEAD`)
* file in `refs/tags/`
* file in `refs/heads` (i.e. a branch)
After fetching `refs/*`, ref is resolved the same way as git does.
Change-Id: Idd49b97cbdc8c6fdc8faa5a48bef3dec25e4ccc3
Diffstat (limited to 'src/libexpr/pos-idx.hh')
0 files changed, 0 insertions, 0 deletions