Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/w4/packfile
🪆 a simple library providing utilities to generate Git Packfiles in memory and send them to clients
https://github.com/w4/packfile
Last synced: 28 days ago
JSON representation
🪆 a simple library providing utilities to generate Git Packfiles in memory and send them to clients
- Host: GitHub
- URL: https://github.com/w4/packfile
- Owner: w4
- License: wtfpl
- Created: 2022-10-22T13:46:59.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T10:12:56.000Z (9 months ago)
- Last Synced: 2024-04-24T21:21:15.364Z (7 months ago)
- Language: Rust
- Size: 59.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Packfile [![Crate](https://img.shields.io/crates/v/packfile.svg)](https://crates.io/crates/packfile) [![API](https://docs.rs/packfile/badge.svg)](https://docs.rs/packfile) [![codecov](https://codecov.io/github/w4/packfile/branch/master/graph/badge.svg?token=4Z9E4UJ0Y6)](https://codecov.io/github/w4/packfile)
`packfile` is a simple library providing utilities to generate [Git Packfiles] in memory.
Usage:
```rust
use packfile::{high_level::GitRepository, low_level::PackFile};let mut repo = GitRepository::default();
repo.insert(&["path", "to"], "file.txt", "hello world!".into()).unwrap();
let (_commit_hash, entries) =
repo.commit("Linus Torvalds", "[email protected]", "Some commit message").unwrap();let _packfile = PackFile::new(&entries);
// ... packfile can then be encoded within a SidebandData to send the data to a client
```[Git Packfiles]: https://git-scm.com/book/en/v2/Git-Internals-Packfiles