Jörg Thalheim
0ec28acef9
libfetchers: fix double quote in path printed in logger
...
(cherry picked from commit 314e9fbeda
)
2025-03-19 22:25:06 +00:00
Robert Hensing
ac3fc8876c
refactor: RAII logger suspension
...
(cherry picked from commit 30694b5d8a
)
2025-03-04 19:10:01 +00:00
Robert Hensing
1222438ae7
Merge remote-tracking branch 'upstream/master' into tomberek.access-token-prefixing
2025-02-25 15:40:34 +01:00
Robert Hensing
c07172220c
refact: Rename url -> hostAndPath
...
https://github.com/NixOS/nix/pull/12465/files#r1955286197
> Perhaps that is a misnomer.
2025-02-25 15:21:09 +01:00
Eelco Dolstra
d7f2c1b7f4
Remove mounted-source-accessor.hh
2025-02-19 10:44:46 +01:00
Eelco Dolstra
0da81343d7
Move MountedSourceAccessor to libutil
2025-02-19 10:44:42 +01:00
Robert Hensing
3556f6bf4c
Write just ./.version on all components
...
This way it's easier to get right. See previous commit.
2025-02-18 11:41:35 +01:00
Robert Hensing
c5fcb1bd50
Fix a few warnings
2025-02-17 19:29:01 +01:00
Thomas Bereknyei
753f00c351
fix: add comment about longest-possible match
2025-02-13 12:47:09 -05:00
Thomas Bereknyei
269efa01b3
fix: ensure access-token matches are complete
2025-02-13 12:45:37 -05:00
Robert Hensing
693a38ae2e
Merge pull request #10153 from b-camacho/lfs
...
git-lfs support
2025-02-13 14:25:30 +01:00
Thomas Bereknyei
a9f4d73d3e
feat: test and document access-token prefix support
2025-02-13 07:10:51 -05:00
Thomas Bereknyei
69c7b42d28
feat: access tokens per repo
2025-02-13 06:07:43 -05:00
Eelco Dolstra
a902b84374
Formatting
2025-02-12 21:51:41 +01:00
Eelco Dolstra
b813a764e0
Merge remote-tracking branch 'origin/master' into self-input-attrs
2025-02-10 17:01:19 +01:00
Eelco Dolstra
428a3e8cc8
Add TODO
2025-02-10 16:18:57 +01:00
Eelco Dolstra
d4ecf15dad
smudgeLfs: Use default value
...
Eventually this should probably become a struct of options.
2025-02-10 16:11:53 +01:00
Eelco Dolstra
d78daaa416
getLfsEndpointUrl(): Use our RAII helpers
2025-02-10 15:59:32 +01:00
Eelco Dolstra
c210efa9ae
Move git-lfs-fetch into its own source file
2025-02-10 15:55:25 +01:00
Eelco Dolstra
9db070d7a2
Misc code cleanups
2025-02-10 15:46:46 +01:00
Eelco Dolstra
c10dbdccac
libfetchers: Drop no longer needed curl dependency
2025-02-10 15:19:28 +01:00
Eelco Dolstra
40e8c5f613
Fix possible deref of null git_config
2025-02-10 15:16:54 +01:00
Eelco Dolstra
1cb9a354fb
Merge remote-tracking branch 'origin/master' into lfs
2025-02-10 14:46:01 +01:00
John Ericson
a562d0b6ce
Merge pull request #12386 from DeterminateSystems/git-fixes
...
Git fetcher: Don't create refs when fetching by revision
2025-02-05 15:18:58 -05:00
Eelco Dolstra
01598487b7
Add FIXME
2025-02-04 16:41:10 +01:00
Eelco Dolstra
1ab97a70f5
fetchOrSubstituteTree(): Return an accessor
...
This prepares lazy access to flake.nix etc.
2025-02-04 16:14:34 +01:00
Leandro Reina
134530a534
Merge remote-tracking branch 'upstream/master' into lfs
2025-02-03 19:07:20 +01:00
mergify[bot]
340eae1f23
Merge pull request #12385 from DeterminateSystems/fix-git-workdir-path-display
...
Fix duplicate setPathDisplay()
2025-02-02 02:10:38 +00:00
Eelco Dolstra
9e240ecced
Remove isConsideredLocked()
2025-01-31 17:03:27 +01:00
Eelco Dolstra
c8b22643ba
readHead(): Make sure we're returning the HEAD ref line
...
If we previously fetched by revision, the output of "git ls-remote"
won't start with the expected line like
ref: refs/heads/master HEAD
but will be something like
5c4410e3b9891c05ab40d723de78c6f0be45ad30 refs/heads/5c4410e3b9891c05ab40d723de78c6f0be45ad30
This then causes Nix to treat that revision as a refname, which then
leads to warnings like
warning: could not update cached head '5c4410e3b9891c05ab40d723de78c6f0be45ad30' for 'file:///tmp/repo'
2025-01-30 19:03:34 +01:00
Eelco Dolstra
ee9fa0d360
Git fetcher: Don't use refspec <rev>:<rev>
...
This causes Git to create a local ref named refs/head/<rev>, e.g.
$ git -C ~/.cache/nix/gitv3/11irpim06vj4h6c0w8yls6kx4hvl0qd0gr1fvk47n76g6wf1s1vk ls-remote --symref .
5c4410e3b9891c05ab40d723de78c6f0be45ad30 refs/heads/5c4410e3b9891c05ab40d723de78c6f0be45ad30
7f6bde8a20de4cccc2256f088bc5af9dbe38881d refs/heads/7f6bde8a20de4cccc2256f088bc5af9dbe38881d
which confuses readHead(), leading to errors like
fatal: Refusing to point HEAD outside of refs/
warning: could not update cached head 'd275d93aa0bb8a004939b2f1e87f559f989453be' for 'file:///tmp/repo'
2025-01-30 19:03:34 +01:00
Eelco Dolstra
9f72d5bce9
Git fetcher: Don't pass URL query parameters for file:// URLs
...
Git interprets them as part of the file name, so passing parameters
like 'rev' breaks. Only relevant for testing (when _NIX_FORCE_HTTP is
set) and local bare repos.
2025-01-30 19:03:34 +01:00
Eelco Dolstra
3032512425
GitExportIgnoreSourceAccessor: Don't show «unknown»
...
In general we should set the path display prefix on the inner
accessor, so we now pass the display prefix to getAccessor().
2025-01-30 12:41:02 +01:00
Eelco Dolstra
102d90ebf0
Fix duplicate setPathDisplay()
...
Fixes messages like 'copying /tmp/repo/tmp/repo to the store'. The
PosixSourceAccessor already sets the prefix. Setting the prefix twice
shouldn't be a problem, but GitRepoImpl::getAccessor() returns a
wrapped accessor so it's not actually idempotent.
2025-01-30 11:27:24 +01:00
Leandro Reina
6a3b4afc0a
Merge remote-tracking branch 'upstream/master' into lfs
2025-01-27 14:44:41 +01:00
Robert Hensing
96e550efc5
Format .nix files
...
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00
Eelco Dolstra
41983dba8f
GitRepo::fetch(): Ignore $GIT_DIR
...
Fixes #12325 .
2025-01-22 17:54:19 +01:00
Eelco Dolstra
bd10b859f7
GitRepo::fetch(): Cleanup
2025-01-22 17:42:52 +01:00
Leandro Reina
23c5219f81
(Part of the) code review
2025-01-21 14:40:27 +01:00
Leandro Reina
40a3007b7c
Merge remote-tracking branch 'upstream/master' into lfs
2025-01-21 14:16:42 +01:00
Eelco Dolstra
a78f55ef97
GitInputScheme: Fix mingw build
...
Mingw apparently is less smart about coercing std::filesystem::path into strings.
2025-01-20 15:39:14 +01:00
Eelco Dolstra
f5548c17ed
getSourcePath(): Return std::filesystem::path
2025-01-17 13:21:53 +01:00
Eelco Dolstra
9003343b53
Git fetcher: Replace RepoInfo::url by a std::variant
...
Previously the 'url' field was either a path or a URL, depending on
'isLocal'. This replaces both fields by a std::variant, which is more
type-safe.
2025-01-17 13:21:53 +01:00
Eelco Dolstra
3197c19a31
Add link to tracking issue
2025-01-17 12:34:38 +01:00
Eelco Dolstra
12e14956e2
Warn against the use of relative 'git+file:' flake inputs
2025-01-16 17:23:31 +01:00
Eelco Dolstra
043df13f72
Merge pull request #10089 from edolstra/relative-flakes
...
Improve support for relative path inputs
2025-01-16 14:21:27 +01:00
Eelco Dolstra
5d03ef9caf
PathInputSchema::getAbsPath(): Return std::filesystem::path
2025-01-16 11:26:14 +01:00
Eelco Dolstra
550fe889ee
Merge remote-tracking branch 'origin/master' into relative-flakes
2025-01-16 11:05:10 +01:00
John Ericson
0c101679b4
Merge pull request #12261 from NixOS/packaging
...
Packaging cleanups, add RossComputerGuy as `-llvm` maintainer
2025-01-15 17:25:15 -05:00
John Ericson
e02026adae
Merge pull request #12254 from DeterminateSystems/fix-relative-path-on-cli
...
Fix relative 'path:' flakerefs in the CLI
2025-01-15 15:19:56 -05:00