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
619619 "walkdir",
620620 ]
621621
622+[[package]]
623+name = "git-protocol"
624+version = "0.0.0"
625+
622626 [[package]]
623627 name = "git-ref"
624628 version = "0.3.0"
Cargo.toml+1−0
@@ -85,6 +85,7 @@ members = [ · 84 unmodified lines
8585 "git-ref",
8686 "git-odb",
8787 "git-repository",
88+ "git-protocol",
8889 "git-transport",
8990 "git-tui",
9091 ]
README.md+44−21
@@ -2,7 +2,7 @@ · 1 unmodified line
22 [![Crates.io](https://img.shields.io/crates/v/gitoxide.svg)](https://crates.io/crates/gitoxide)
33
44 **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_.
66
77 Furthermore it provides **an easy and safe to use API** in the form of various small crates for implementing your own tools in a breeze.
88 Please 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
1515 * please note that all functionality comes from the `gitoxide-core` library, which mirrors these capabilities
1616 and itself relies on all `git-*` crates.
1717 * limit amount of threads used in operations that support it.
18− * repository
19− * [x] init
20− * plumbing
21− * [x] [pack verify](https://asciinema.org/a/352942)
22− * [x] [pack index verify](https://asciinema.org/a/352945) including each object sha1 and statistics
23− * [x] [pack explode](https://asciinema.org/a/352951), useful for transforming packs into loose objects for inspection or restoration
24− * [x] verify written objects (by reading them back from disk)
25− * [x] [index from pack](https://asciinema.org/a/352941) - create an index file by streaming a pack file as done during clone
26− * [ ] support for thin packs (as needed for fetch/pull)
18+ * choose between 'human' and 'json' output formats
19+ * **the `gix` program** - convenient and for humans
20+ * [x] init - initialize a new non-bare repository with a `main` branch
21+ * **the `gixp` program** _(plumbing)_ - lower level commands for use in automation
22+ * **pack**
23+ * [x] [pack verify](https://asciinema.org/a/352942)
24+ * [x] [pack index verify](https://asciinema.org/a/352945) including each object sha1 and statistics
25+ * [x] [pack explode](https://asciinema.org/a/352951), useful for transforming packs into loose objects for inspection or restoration
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)
2732 * **git-object**
2833 * *decode (zero-copy)* borrowed objects
2934 * [x] commit
@@ -98,7 +103,7 @@ Please see _'Development Status'_ for a listing of all crates and their capabili · 68 unmodified lines
98103 * **git-ref**
99104 * Handle symbolic references and packed references
100105 * discover them in typical folder structures
101− * [x] name validation
106+ * [x] [name validation](https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L23:L23)
102107 * [ ] API documentation with examples
103108 * **git-index**
104109 * 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
109114 * diffing, merging, working with hunks of data
110115 * find differences between various states, i.e. index, working tree, commit-tree
111116 * [ ] 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
112121 * **git-protocol**
113− * [ ] client side
114− * [ ] server side
115−* **git-transport**
116− * [ ] client side
117− * [ ] server side
118− * [ ] via ssh
119− * [ ] push
120− * [ ] pull
121− * [ ] via https
122+ * [ ] [PKT-Line](https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L52:L52)
123+ * [ ] encode
124+ * [ ] decode
125+ * [ ] [error line](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L28:L28)
126+ * [ ] `Iterator` for multi-plexed pack lines from `Read`
127+ * [ ] parse and serialize [capabilities](https://github.com/git/git/blob/master/Documentation/technical/protocol-capabilities.txt#L1:L1)
128+ * [ ] V1
129+ * [ ] [fetch](https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt#L157:L157)
130+ * [ ] client
131+ * [ ] server
122132 * [ ] push
123− * [ ] pull
133+ * [ ] 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
124147 * [ ] API documentation with examples
125148 * **git-features**
126149 * **parallel** feature toggle
git-protocol/Cargo.toml+12−0
@@ -0,0 +1,12 @@
1+[package]
2+name = "git-protocol"
3+version = "0.0.0"
4+repository = "https://github.com/Byron/git-oxide"
5+license = "MIT"
6+description = "A WIP crate of the gitoxide project for implementing git protocols"
7+authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
8+edition = "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 performance
1+## Potential for improving performance
2+
3+### Pack Decoding
24
35 * [ ] @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."
46 * @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 @@
11 ### Cloning
22
33 * **git-transport**
4− * [ ] transport layer
4+ * [ ] transport layer https or ssh
55 * [ ] receive a pack
66 * **git-refs**
77 * Enough to handle a git fetch - maybe we can just hardcode things for now…