Eelco Dolstra
3f0a8241fc
Fix path display of empty Git repos
2025-04-01 13:58:08 +02: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
9db070d7a2
Misc code cleanups
2025-02-10 15:46:46 +01:00
Leandro Reina
134530a534
Merge remote-tracking branch 'upstream/master' into lfs
2025-02-03 19:07:20 +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
Leandro Reina
6a3b4afc0a
Merge remote-tracking branch 'upstream/master' into lfs
2025-01-27 14:44:41 +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
2a2518b408
LFS code review
2025-01-10 18:32:09 +01:00
Leandro Reina
7756b2286d
Merge remote-tracking branch 'upstream/master' into lfs
2024-12-18 18:18:45 +01:00
Leandro Reina
b1663fa3fb
Re-introduce git_attr_get_ext
2024-12-18 18:00:45 +01:00
Eelco Dolstra
33852ead6b
Optimisation
2024-12-17 12:56:14 +01:00
Eelco Dolstra
b9f60faab5
Fix macOS build
2024-12-17 12:56:14 +01:00
Eelco Dolstra
7ba933e989
Cache calls to GitRepo::getWorkdirInfo()
...
A command like `nix flake metadata` was causing about 4 calls to
getWorkdirInfo(), which is slow for large repos (even when they're not
dirty).
2024-12-17 12:56:14 +01:00
Eelco Dolstra
331bf3e261
Git fetcher: Calculate a fingerprint for dirty workdirs
...
This restores evaluation caching for dirty Git workdirs.
2024-12-17 12:56:14 +01:00
Leandro Emmanuel Reina Kiperman
140b34b7ed
Apply suggestions from code review
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-12-09 19:02:50 +01:00
Brian Camacho
79a6438c68
fix sizeCallback
2024-12-02 14:53:19 -05:00
Leandro Reina
93e63f78b3
FIx MacOS build
2024-11-21 13:53:46 +01:00
Leandro Reina
79d41062d0
Fix some errors, and add tests for them
2024-11-20 17:53:06 +01:00
Brian Camacho
6d0043902a
Merge remote-tracking branch 'origin/master' into lfs
2024-11-17 12:16:15 -05:00
Brian Camacho
24453b79eb
pass path.rel instead of path.abs to gitattr matcher
2024-11-17 02:39:47 -05:00
Brian Camacho
741a54df8f
tweak url parsing; add test case
2024-11-07 23:29:39 -05:00
Robert Hensing
388271e8ec
initRepoAtomically: Catch directory_not_empty
2024-11-06 23:52:48 +01:00
Brian Camacho
99705c6932
Merge remote-tracking branch 'origin/master' into lfs
2024-11-06 15:18:21 -05:00
Brian Camacho
d2d6f2086a
Sink readFile impl for GitSourceAccessor
2024-11-05 02:27:54 -05:00
Brian Camacho
f4962fe59b
working smudge for GitSourceAccessor
2024-11-01 03:37:48 -04:00
Brian Camacho
87e0bc9e21
add libcurl to deps, builds now
2024-10-26 15:02:57 -04:00
Eelco Dolstra
4012954b59
Handle tarballs where directory entries are not contiguous
...
I.e. when not all entries underneath a directory X follow eachother,
but there is some entry Y that isn't a child of X in between.
Fixes #11656 .
2024-10-14 13:53:54 +02:00
Jörg Thalheim
30655dd146
git-utils: fix x86_64-w64-mingw32 build
2024-10-11 21:04:52 +02:00
Jörg Thalheim
12d5b2cfa1
create git caches atomically
...
When working on speeding up the CI,
I triggered a race condition in the creation of the tarball cache.
This code now instead will ensure that half-initialized repositories
are no longer visible to any other nix process.
This is the error message that I got before:
error: opening Git repository '"/Users/runner/.cache/nix/tarball-cache"': could not find repository at '/Users/runner/.cache/nix/tarball-cache'
2024-09-26 17:46:25 +02:00
John Ericson
2b6b03d8df
Ensure error messages don't leak private key
...
Since #8766 , invalid base64 is rendered in errors, but we don't actually
want to show this in the case of an invalid private keys.
Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
2024-09-23 16:36:48 -04:00
Robert Hensing
799abea0c4
Merge pull request #11330 from NixOS/packfile
...
libgit2, GitRepo: Write (thin) packfiles
2024-09-16 14:42:59 +02:00
Robert Hensing
976f539f7d
Make Repo::flush interruptible
2024-09-16 13:42:46 +02:00
Robert Hensing
bbef37b4a6
Merge pull request #11423 from DeterminateSystems/ignore-stale-submodules
...
Git fetcher: Ignore .gitmodules entries that are not submodules
2024-09-12 18:14:18 +02:00
Noam Yorav-Raphael
38bfbb297c
Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined ( #11351 )
2024-09-11 10:36:46 +00:00
Eelco Dolstra
9d24080090
Git fetcher: Ignore .gitmodules entries that are not submodules
...
Fixes #10739 .
2024-09-04 14:46:33 +02:00
Robert Hensing
57c48304bb
fixup: Release odb
2024-08-28 17:49:22 +02:00
Robert Hensing
fb8d3ed150
fixup: sync -> flush
...
The latter is not used for memory synchronization things.
2024-08-28 17:49:22 +02:00
Robert Hensing
d0f8a92363
Make tarball cache more interruptible
2024-08-28 17:49:22 +02:00
Robert Hensing
5dd6c4f062
libgit2, GitRepo: Write thin packfiles
...
libgit2 didn't write thin ones, hence the patch.
This should improve performance on systems with weak I/O in ~/.cache,
especially in terms of operations per second, or where system calls
are slower. (macOS, VMs?)
2024-08-28 17:49:21 +02:00
Brian Camacho
ba417a2172
wip
2024-08-26 16:57:49 -04:00
Brian Camacho
cec370e62b
Merge branch 'master' into lfs
2024-08-06 17:30:07 +02:00
Eelco Dolstra
7c18b4d060
Don't dereference top-level regular files
...
Since this yielded an empty directory as far back as Nix 2.3, we don't
really need special handling for executables vs non-executables.
2024-07-29 14:34:02 +02:00
Eelco Dolstra
e0012b97ab
Split tarball-specific logic from GitFileSystemObjectSink
2024-07-29 14:26:25 +02:00
Eelco Dolstra
06b686b62d
Handle tarballs that don't consist of a single top-level directory
...
Fixes #4785 (top-level directories are no longer merged into one).
Fixes #10983 (top-level non-directories are no longer discarded).
2024-07-26 20:24:58 +02:00
Eelco Dolstra
d9ba2a1634
Fix error message
2024-07-26 19:06:49 +02:00
Robert Hensing
4fd8f19ecf
Fix build to use CanonPath in new FSO sinks
2024-07-11 12:14:48 +02:00
Robert Hensing
86420753ec
Merge remote-tracking branch 'upstream/master' into support-hardlinks-in-tarballs
2024-07-11 11:43:02 +02:00
Robert Hensing
f0329568b5
GitFileSystemObjectSink: catch an overflow
2024-07-01 17:29:07 +02:00