LFSPull allows you to pull files from git-lfs. It currently supports:
- Token-auth only
- Pulling single files
- Globbing patterns and pulling all matches
- Cache-compatible with the original git-lfs
- Hash verification of the downloaded file
The CLI is pretty straight forward.
-f / --file-to-pull [FILE]
single file download mode- e.g.
lfspull -f my_file.tar.gz
downloads the file
- e.g.
- '-r / --recurse-pattern [PATTERN]' downloads everything that matches the pattern
- e.g. 'lfspull -r "*.tgz"' downloads all .tgz files in this folder
- e.g. 'lfspull -r "**/*.tgz"' downloads all .tgz files this folder and all subfolders
- '-b / --random-bytes [RANDOM_BYTES]' for temp file name. See https://docs.rs/tempfile/latest/tempfile/struct.Builder.html#method.rand_bytes
- '-a / --access-token [TOKEN]' sets the token - can also be set via $ACCESS_TOKEN from env
- '-v' for verbose mode
Please see our docs.rs for example code and the gherkin tests for how to check the origin of the file.
- fix bug when trying to rename temp file to cache file, but cache file is already created and locked by other parallel job
- use stream_bytes to download object directly into a temporary files and avoid 'memory allocation of x bytes failed'