History

first bunch of tasks I see after studying parts of the protocol docs

Sebastian Thiel committed 6 years ago

Commit 9bd97ba1 parent 63c129210 files · +63 −20Browse files

Unified · Split

10 files
  1. Cargo.lock +4 −0
  2. Cargo.toml +1 −0
  3. README.md +44 −21
  4. git-protocol/Cargo.toml +12 −0
  5. git-protocol/src/lib.rs +1 −0
  6. git-protocol/tests/fixtures/v1/01.request +0 −0
  7. git-protocol/tests/fixtures/v1/fetch/01-many-refs.request +0 −0
  8. git-protocol/tests/fixtures/v1/fetch/01-many-refs.response +0 −0
  9. performance-tasks.md +3 −1
  10. tasks.md +1 −1
Cargo.lock+4−0
@@ -619,6 +619,10 @@ dependencies = [ · 618 unmodified lines
619 "walkdir",619 "walkdir",
620]620]
621 621
622[[package]]
623name = "git-protocol"
624version = "0.0.0"
625
622[[package]]626[[package]]
623name = "git-ref"627name = "git-ref"
624version = "0.3.0"628version = "0.3.0"
Cargo.toml+1−0
@@ -85,6 +85,7 @@ members = [ · 84 unmodified lines
85 "git-ref",85 "git-ref",
86 "git-odb",86 "git-odb",
87 "git-repository",87 "git-repository",
88 "git-protocol",
88 "git-transport",89 "git-transport",
89 "git-tui",90 "git-tui",
90]91]
README.md+44−21
@@ -2,7 +2,7 @@ · 1 unmodified line
2[![Crates.io](https://img.shields.io/crates/v/gitoxide.svg)](https://crates.io/crates/gitoxide)2[![Crates.io](https://img.shields.io/crates/v/gitoxide.svg)](https://crates.io/crates/gitoxide)
3 3
4**gix** is a command-line interface (*CLI*) to access git repositories. It's written to optimize the4**gix** is a command-line interface (*CLI*) to access git repositories. It's written to optimize the
5_user-experience_, and perform as _good or better than the native implementation_.5_user-experience_, and perform as _good or better than the canonical implementation_.
6 6
7Furthermore it provides **an easy and safe to use API** in the form of various small crates for implementing your own tools in a breeze.7Furthermore it provides **an easy and safe to use API** in the form of various small crates for implementing your own tools in a breeze.
8Please see _'Development Status'_ for a listing of all crates and their capabilities.8Please see _'Development Status'_ for a listing of all crates and their capabilities.
@@ -15,15 +15,20 @@ Please see _'Development Status'_ for a listing of all crates and their capabili · 6 unmodified lines
15 * please note that all functionality comes from the `gitoxide-core` library, which mirrors these capabilities15 * please note that all functionality comes from the `gitoxide-core` library, which mirrors these capabilities
16 and itself relies on all `git-*` crates.16 and itself relies on all `git-*` crates.
17 * limit amount of threads used in operations that support it.17 * limit amount of threads used in operations that support it.
18 * repository18 * choose between 'human' and 'json' output formats
19 * [x] init19 * **the `gix` program** - convenient and for humans
20 * plumbing20 * [x] init - initialize a new non-bare repository with a `main` branch
21 * [x] [pack verify](https://asciinema.org/a/352942)21 * **the `gixp` program** _(plumbing)_ - lower level commands for use in automation
22 * [x] [pack index verify](https://asciinema.org/a/352945) including each object sha1 and statistics22 * **pack**
23 * [x] [pack explode](https://asciinema.org/a/352951), useful for transforming packs into loose objects for inspection or restoration23 * [x] [pack verify](https://asciinema.org/a/352942)
24 * [x] verify written objects (by reading them back from disk)24 * [x] [pack index verify](https://asciinema.org/a/352945) including each object sha1 and statistics
25 * [x] [index from pack](https://asciinema.org/a/352941) - create an index file by streaming a pack file as done during clone25 * [x] [pack explode](https://asciinema.org/a/352951), useful for transforming packs into loose objects for inspection or restoration
26 * [ ] support for thin packs (as needed for fetch/pull)26 * [x] verify written objects (by reading them back from disk)
27 * [ ] pack-send - create a pack and send it using the pack protocol to stdout
28 * [ ] pack-receive - receive a pack produced by pack-send
29 * **index**
30 * [x] [index from pack](https://asciinema.org/a/352941) - create an index file by streaming a pack file as done during clone
31 * [ ] support for thin packs (as needed for fetch/pull)
27* **git-object**32* **git-object**
28 * *decode (zero-copy)* borrowed objects33 * *decode (zero-copy)* borrowed objects
29 * [x] commit34 * [x] commit
@@ -98,7 +103,7 @@ Please see _'Development Status'_ for a listing of all crates and their capabili · 68 unmodified lines
98* **git-ref**103* **git-ref**
99 * Handle symbolic references and packed references104 * Handle symbolic references and packed references
100 * discover them in typical folder structures105 * discover them in typical folder structures
101 * [x] name validation106 * [x] [name validation](https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L23:L23)
102 * [ ] API documentation with examples107 * [ ] API documentation with examples
103* **git-index**108* **git-index**
104 * read and write a git-index file109 * read and write a git-index file
@@ -109,18 +114,36 @@ Please see _'Development Status'_ for a listing of all crates and their capabili · 4 unmodified lines
109 * diffing, merging, working with hunks of data114 * diffing, merging, working with hunks of data
110 * find differences between various states, i.e. index, working tree, commit-tree115 * find differences between various states, i.e. index, working tree, commit-tree
111 * [ ] API documentation with examples116 * [ ] API documentation with examples
117* **git-url**
118 * [ ] ssh://user@example.com/project.git
119 * [ ] user@example.com:project.git
120 * [ ] ssh://user@example.com/~alice/project.git
112* **git-protocol**121* **git-protocol**
113 * [ ] client side122 * [ ] [PKT-Line](https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L52:L52)
114 * [ ] server side123 * [ ] encode
115* **git-transport**124 * [ ] decode
116 * [ ] client side125 * [ ] [error line](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L28:L28)
117 * [ ] server side126 * [ ] `Iterator` for multi-plexed pack lines from `Read`
118 * [ ] via ssh127 * [ ] parse and serialize [capabilities](https://github.com/git/git/blob/master/Documentation/technical/protocol-capabilities.txt#L1:L1)
119 * [ ] push128 * [ ] V1
120 * [ ] pull129 * [ ] [fetch](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L157:L157)
121 * [ ] via https130 * [ ] client
131 * [ ] server
122 * [ ] push132 * [ ] push
123 * [ ] pull133 * [ ] client
134 * [ ] server
135 * [ ] [V2](https://github.com/git/git/blob/master/Documentation/technical/protocol-v2.txt)
136* **git-transport**
137 * [ ] **[git](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L66:L66)**
138 * [ ] **initiate**
139 * [ ] [extra parameters](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L52:L52) via null separated k=v pairs
140 * [ ] protocol version definition
141 * [ ] **[ssh](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L103:L103)**
142 * `ssh2` crate with [openssl vendoring support](https://lib.rs/crates/ssh2) for static linkage
143 * [ ] **initiate**
144 * extra paramaters (via environment variable)
145 * [ ] protocol for transfer via http(s)
146 * [ ] extra parameters
124 * [ ] API documentation with examples147 * [ ] API documentation with examples
125* **git-features**148* **git-features**
126 * **parallel** feature toggle149 * **parallel** feature toggle
git-protocol/Cargo.toml+12−0
@@ -0,0 +1,12 @@
1[package]
2name = "git-protocol"
3version = "0.0.0"
4repository = "https://github.com/Byron/git-oxide"
5license = "MIT"
6description = "A WIP crate of the gitoxide project for implementing git protocols"
7authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
8edition = "2018"
9
10# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
11
12[dependencies]
git-protocol/src/lib.rs+1−0
@@ -0,0 +1 @@
1#![forbid(unsafe_code)]
git-protocol/tests/fixtures/v1/01.request+0−0

Binary file not shown.

git-protocol/tests/fixtures/v1/fetch/01-many-refs.request+0−0

Binary file not shown.

git-protocol/tests/fixtures/v1/fetch/01-many-refs.response+0−0

Binary file not shown.

performance-tasks.md+3−1
@@ -1,4 +1,6 @@
1### Potential for improving performance1## Potential for improving performance
2
3### Pack Decoding
2 4
3* [ ] @joshtriplett writes: "Regarding decompression performance, try replacing miniz_oxide with a better zlib decoder. Build with libz-sys, and then try substituting zlib-ng built with --zlib-compat. (I'm working on making that easier.) That should substantially improve decompression."5* [ ] @joshtriplett writes: "Regarding decompression performance, try replacing miniz_oxide with a better zlib decoder. Build with libz-sys, and then try substituting zlib-ng built with --zlib-compat. (I'm working on making that easier.) That should substantially improve decompression."
4 * @joshtriplett writes: "As far as I know, I'm not aware of flate2 adding any significant overhead, and it provides fairly low-level interfaces in addition to high-level ones. If there's a good reason to, you could use libz-sys directly, but that's a less safe interface. Either way, if you port to libz-sys or to a crate like flate2 that's based on libz-sys, that'll make it trivial to switch to zlib-ng later, as well as making it easy to test zlib-ng now via LD_LIBRARY_PATH."6 * @joshtriplett writes: "As far as I know, I'm not aware of flate2 adding any significant overhead, and it provides fairly low-level interfaces in addition to high-level ones. If there's a good reason to, you could use libz-sys directly, but that's a less safe interface. Either way, if you port to libz-sys or to a crate like flate2 that's based on libz-sys, that'll make it trivial to switch to zlib-ng later, as well as making it easy to test zlib-ng now via LD_LIBRARY_PATH."
tasks.md+1−1
@@ -1,7 +1,7 @@
1### Cloning1### Cloning
2 2
3* **git-transport**3* **git-transport**
4 * [ ] transport layer4 * [ ] transport layer https or ssh
5 * [ ] receive a pack5 * [ ] receive a pack
6* **git-refs**6* **git-refs**
7 * Enough to handle a git fetch - maybe we can just hardcode things for now…7 * Enough to handle a git fetch - maybe we can just hardcode things for now…