Skip to content

Commit b59bd5e

Browse files
committed
Merge from main.
I had to change `#[forbid(rust_2018_idioms)]` to `#[deny(rust_2018_idioms)]` in order for `quick_error!` to compile.
2 parents 1ce8468 + 8877b77 commit b59bd5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+848
-390
lines changed

Diff for: Cargo.lock

+41-55
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ prodash-render-line = ["prodash/render-line"]
6060
anyhow = "1.0.31"
6161

6262
gitoxide-core = { version = "^0.4.0", path = "gitoxide-core" }
63-
git-features = { version = "^0.5.0", path = "git-features" }
63+
git-features = { version = "^0.6.0", path = "git-features" }
6464
# just for feature configuration
6565
git-transport = { optional = true, version = "^0.2.0", path = "git-transport" }
6666

@@ -70,7 +70,7 @@ prodash = { version = "10.0.0", optional = true, default-features = false }
7070
atty = { version = "0.2.14", optional = true, default-features = false }
7171
env_logger = { version = "0.7.1", optional = true, default-features = false, features = ["humantime", "termcolor", "atty"] }
7272
crosstermion = { version = "0.3.0", optional = true, default-features = false }
73-
futures-lite = { version = "0.1.10", optional = true, default-features = false }
73+
futures-lite = { version = "1.4.0", optional = true, default-features = false, features = ["std"] }
7474

7575
[profile.release]
7676
overflow-checks = false

Diff for: README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Please see _'Development Status'_ for a listing of all crates and their capabili
118118
* [x] abort early for ls-remote capabilities
119119
* [x] packfile negotiation
120120
* [x] delegate can support for all fetch features, including shallow, deepen, etc.
121-
* [ ] receive parsed shallow refs
121+
* [x] receive parsed shallow refs
122122
* [ ] push
123123
* [ ] API documentation with examples
124124

@@ -144,7 +144,8 @@ Please see _'Development Status'_ for a listing of all crates and their capabili
144144
* [x] git://<service>
145145
* [x] V1 handshake
146146
* [x] send values + receive data with sidebands
147-
* [ ] support for receiving 'shallow' refs
147+
* [ ] ~~support for receiving 'shallow' refs in case the remote repository is shallow itself (I presume)~~
148+
* Since V2 doesn't seem to support that, let's skip this until there is an actual need. No completionist :D
148149
* [x] V2 handshake
149150
* [x] send command request, receive response with sideband support
150151
* [x] http(s)://<service>
@@ -461,6 +462,9 @@ From there, we can derive a few rules to try adhere to:
461462
* **Packfiles cannot load files bigger than 2^31 or 2^32 on 32 bit systems**
462463
* As these systems cannot address more memory than that.
463464
* _potential remedy_: implement a sliding window to map and unmap portions of the file as needed.
465+
* **Objects larger than 32bits cannot be loaded on 32 bit systems**
466+
* in-memory representations objects cannot handle objects greater than the amount of addressable memory.
467+
* This should not affect git LFS though.
464468
* **CRC32** implementation doesn't use SIMD
465469
* Probably at no cost one could upgrade to the **crc32fast** crate, but it looks unmaintained and has more code.
466470
* **git-url** _might_ be more restrictive than what git allows as for the most part, it uses a browser grade URL parser.

Diff for: git-commitgraph/src/graph/access.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ use crate::{CommitData, Graph, GraphFile};
44
use git_object::borrowed;
55

66
impl Graph {
7-
pub fn commit_at(&self, pos: GraphPosition) -> CommitData {
7+
pub fn commit_at(&self, pos: GraphPosition) -> CommitData<'_> {
88
let r = self.lookup_by_pos(pos);
99
r.file.commit_at(r.lex_pos)
1010
}
1111

12-
pub fn commit_by_id(&self, id: borrowed::Id) -> Option<CommitData> {
12+
pub fn commit_by_id(&self, id: borrowed::Id<'_>) -> Option<CommitData<'_>> {
1313
let r = self.lookup_by_id(id)?;
1414
Some(r.file.commit_at(r.lex_pos))
1515
}
1616

17-
pub fn id_at(&self, pos: GraphPosition) -> borrowed::Id {
17+
pub fn id_at(&self, pos: GraphPosition) -> borrowed::Id<'_> {
1818
let r = self.lookup_by_pos(pos);
1919
r.file.id_at(r.lex_pos)
2020
}
2121

2222
/// Iterate over commits in unsorted order.
23-
pub fn iter_commits(&self) -> impl Iterator<Item = CommitData> {
23+
pub fn iter_commits(&self) -> impl Iterator<Item = CommitData<'_>> {
2424
self.files.iter().flat_map(|file| file.iter_commits())
2525
}
2626

2727
/// Iterate over commit IDs in unsorted order.
28-
pub fn iter_ids(&self) -> impl Iterator<Item = borrowed::Id> {
28+
pub fn iter_ids(&self) -> impl Iterator<Item = borrowed::Id<'_>> {
2929
self.files.iter().flat_map(|file| file.iter_ids())
3030
}
3131

32-
pub fn lookup(&self, id: borrowed::Id) -> Option<GraphPosition> {
32+
pub fn lookup(&self, id: borrowed::Id<'_>) -> Option<GraphPosition> {
3333
Some(self.lookup_by_id(id)?.graph_pos)
3434
}
3535

@@ -39,7 +39,7 @@ impl Graph {
3939
}
4040

4141
impl Graph {
42-
fn lookup_by_id(&self, id: borrowed::Id) -> Option<LookupByIdResult> {
42+
fn lookup_by_id(&self, id: borrowed::Id<'_>) -> Option<LookupByIdResult<'_>> {
4343
let mut current_file_start = 0;
4444
for file in self.files.iter() {
4545
if let Some(lex_pos) = file.lookup(id) {
@@ -54,7 +54,7 @@ impl Graph {
5454
None
5555
}
5656

57-
fn lookup_by_pos(&self, pos: GraphPosition) -> LookupByPositionResult {
57+
fn lookup_by_pos(&self, pos: GraphPosition) -> LookupByPositionResult<'_> {
5858
let mut remaining = pos.0;
5959
for file in self.files.iter() {
6060
match remaining.checked_sub(file.num_commits()) {

0 commit comments

Comments
 (0)