Unified · Split
| @@ -1083,6 +1083,15 @@ dependencies = [ · 1082 unmodified lines | |||
| 1083 | "serde", | 1083 | "serde", |
| 1084 | ] | 1084 | ] |
| 1085 | 1085 | ||
| 1086 | [[package]] | ||
| 1087 | name = "git-chunk" | ||
| 1088 | version = "0.0.0" | ||
| 1089 | dependencies = [ | ||
| 1090 | "git-testtools", | ||
| 1091 | "hex", | ||
| 1092 | "quick-error", | ||
| 1093 | ] | ||
| 1094 | |||
| 1086 | [[package]] | 1095 | [[package]] |
| 1087 | name = "git-commitgraph" | 1096 | name = "git-commitgraph" |
| 1088 | version = "0.7.0" | 1097 | version = "0.7.0" |
| @@ -110,6 +110,7 @@ members = [ · 109 unmodified lines | |||
| 110 | "git-config", | 110 | "git-config", |
| 111 | "git-features", | 111 | "git-features", |
| 112 | "git-commitgraph", | 112 | "git-commitgraph", |
| 113 | "git-chunk", | ||
| 113 | "git-object", | 114 | "git-object", |
| 114 | "git-diff", | 115 | "git-diff", |
| 115 | "git-traverse", | 116 | "git-traverse", |
| @@ -62,6 +62,7 @@ Follow linked crate name for detailed status. Please note that all crates follow · 61 unmodified lines | |||
| 62 | * **usable** | 62 | * **usable** |
| 63 | * [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor) | 63 | * [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor) |
| 64 | * [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash) | 64 | * [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash) |
| 65 | * [git-chunk](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-chunk) | ||
| 65 | * [git-object](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-object) | 66 | * [git-object](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-object) |
| 66 | * [git-validate](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-validate) | 67 | * [git-validate](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-validate) |
| 67 | * [git-url](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-url) | 68 | * [git-url](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-url) |
| @@ -8,6 +8,10 @@ · 7 unmodified lines | |||
| 8 | * [x] API documentation | 8 | * [x] API documentation |
| 9 | * [ ] Some examples | 9 | * [ ] Some examples |
| 10 | 10 | ||
| 11 | ### git-chunk | ||
| 12 | * [ ] decode the chunk file table of contents and provide convenient API | ||
| 13 | * [ ] write the table of contents | ||
| 14 | |||
| 11 | ### git-object | 15 | ### git-object |
| 12 | * *decode (zero-copy)* borrowed objects | 16 | * *decode (zero-copy)* borrowed objects |
| 13 | * [x] commit | 17 | * [x] commit |
| @@ -0,0 +1,9 @@ | |||
| 1 | # Changelog | ||
| 2 | |||
| 3 | All notable changes to this project will be documented in this file. | ||
| 4 | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
| 7 | |||
| 8 | ## Unreleased | ||
| 9 | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | [package] | ||
| 2 | name = "git-chunk" | ||
| 3 | version = "0.0.0" | ||
| 4 | description = "Interact with the git chunk file format used in multi-pack index and commit-graph files" | ||
| 5 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] | ||
| 6 | repository = "https://github.com/Byron/gitoxide" | ||
| 7 | documentation = "https://github.com/git/git/blob/seen/Documentation/technical/chunk-format.txt" | ||
| 8 | license = "MIT/Apache-2.0" | ||
| 9 | edition = "2018" | ||
| 10 | include = ["src/**/*", "CHANGELOG.md"] | ||
| 11 | |||
| 12 | [lib] | ||
| 13 | doctest = false | ||
| 14 | test = false | ||
| 15 | |||
| 16 | [dependencies] | ||
| 17 | quick-error = "2.0.0" | ||
| 18 | hex = "0.4.2" | ||
| 19 | |||
| 20 | [dev-dependencies] | ||
| 21 | git-testtools = { path = "../tests/tools"} | ||
| 22 | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | //! Low-level access to reading and writing chunk file based formats. | ||
| 2 | //! | ||
| 3 | //! See the [git documentation](https://github.com/git/git/blob/seen/Documentation/technical/chunk-format.txt) for details. | ||
| 4 | #![deny(unsafe_code)] | ||
| 5 | #![deny(rust_2018_idioms, missing_docs)] | ||
| @@ -0,0 +1,2 @@ | |||
| 1 | #[test] | ||
| 2 | fn it_works() {} | ||
| @@ -0,0 +1 @@ | |||
| 1 | mod chunk; | ||
| @@ -44,9 +44,9 @@ pub mod access { · 43 unmodified lines | |||
| 44 | /// | 44 | /// |
| 45 | pub mod init { | 45 | pub mod init { |
| 46 | use crate::multi_index::{File, Version}; | 46 | use crate::multi_index::{File, Version}; |
| 47 | use byteorder::{BigEndian, ByteOrder}; | 47 | use byteorder::{BigEndian, ByteOrder, ReadBytesExt}; |
| 48 | use filebuffer::FileBuffer; | 48 | use filebuffer::FileBuffer; |
| 49 | use std::convert::TryFrom; | 49 | use std::convert::{TryFrom, TryInto}; |
| 50 | use std::path::Path; | 50 | use std::path::Path; |
| 51 | 51 | ||
| 52 | mod error { | 52 | mod error { |