Skip to content

Commit 983ec7d

Browse files
committed
first review round
* document as much as possible * simplify signatures * add TODOs for other opportunities
1 parent 80e5804 commit 983ec7d

File tree

6 files changed

+319
-274
lines changed

6 files changed

+319
-274
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crate-status.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
293293
* [x] safe with cycles and recursive configurations
294294
* [x] multi-line with comments and quotes
295295
* **promisor**
296-
* It's vague, but these seems to be like index files allowing to fetch objects from a server on demand.
296+
* It's vague, but these seem to be like index files allowing to fetch objects from a server on demand.
297297
* [x] API documentation
298298
* [ ] Some examples
299299

@@ -363,10 +363,17 @@ Check out the [performance discussion][gix-diff-performance] as well.
363363

364364
### gix-blame
365365

366-
* [ ] commit-annotations for a single file
366+
* [x] commit-annotations for a single file
367367
- [ ] progress
368-
- [ ] interruptability
368+
- [ ] interruptibility
369369
- [ ] streaming
370+
- [ ] support for worktree changes (creates virtual commit on top of `HEAD`)
371+
- [ ] shallow-history support
372+
- [ ] rename tracking (track different paths through history)
373+
- [ ] commits to ignore
374+
* **Performance-Improvements**
375+
- [ ] use commit-graph bloom filter for performance
376+
- [ ] traverse input-commits in correct order without `compute_indegrees_to_depth()`
370377
* [x] API documentation
371378
* [ ] Examples
372379

gitoxide-core/src/repository/blame.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ pub fn blame_file(mut repo: gix::Repository, file: &OsStr, out: impl std::io::Wr
77
repo.object_cache_size_if_unset(repo.compute_object_cache_size_for_tree_diffs(&**repo.index_or_empty()?));
88

99
let suspect = repo.head()?.peel_to_commit_in_place()?;
10-
let traverse: Vec<_> =
10+
let traverse =
1111
gix::traverse::commit::topo::Builder::from_iters(&repo.objects, [suspect.id], None::<Vec<gix::ObjectId>>)
12-
.build()?
13-
.collect();
12+
.build()?;
1413
let mut resource_cache = repo.diff_resource_cache_for_tree_diff()?;
1514

1615
let work_dir: PathBuf = repo
@@ -19,11 +18,10 @@ pub fn blame_file(mut repo: gix::Repository, file: &OsStr, out: impl std::io::Wr
1918
.into();
2019
let file_path: &BStr = gix::path::os_str_into_bstr(file)?;
2120

22-
let blame_entries = gix::blame::blame_file(
21+
let blame_entries = gix::blame::file(
2322
&repo.objects,
2423
traverse,
2524
&mut resource_cache,
26-
suspect.id,
2725
work_dir.clone(),
2826
file_path,
2927
)?;

gix-blame/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rust-version = "1.65"
1414
doctest = false
1515

1616
[dependencies]
17+
gix-path = { version = "^0.10.13", path = "../gix-path" }
1718
gix-diff = { version = "^0.49.0", path = "../gix-diff", default-features = false, features = ["blob"] }
1819
gix-object = { version = "^0.46.0", path = "../gix-object" }
1920
gix-hash = { version = "^0.15.0", path = "../gix-hash" }

0 commit comments

Comments
 (0)