Skip to content

Commit 4931625

Browse files
committed
flyby fixes
Just some fixes while perusing the codebase.
1 parent 55e0915 commit 4931625

File tree

6 files changed

+5
-22
lines changed

6 files changed

+5
-22
lines changed

Cargo.lock

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

crates/but-status/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ publish = false
99
gix.workspace = true
1010
anyhow.workspace = true
1111
bstr.workspace = true
12-
serde_json = "1.0.142"
13-
serde.workspace = true

crates/but-status/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use gix::status::index_worktree;
44
/// This includes files in the index that are considered conflicted.
55
///
66
/// TODO: This is a copy of `create_wd_tree` from the old world. Ideally we
7-
/// should share between the old and new worlds to prevent duplication beween
8-
/// these.
7+
/// should share between the old and new worlds to prevent duplication between
8+
/// these.
99
pub fn create_wd_tree(
1010
repo: &gix::Repository,
1111
untracked_limit_in_bytes: u64,

crates/but-workspace/src/commit_engine/index.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
use bstr::{BStr, BString, ByteSlice};
2-
use std::{collections::HashSet, path::Path};
1+
use bstr::{BStr, ByteSlice};
2+
use std::path::Path;
33

4-
/// Turn `rhs` into `lhs` by modifying `rhs`. This will leave `rhs` intact as much as possible, but will remove
4+
/// Turn `rhs` into `lhs` by modifying `rhs`. This will leave `rhs` intact as much as possible.
55
/// Note that conflicting entries will be replaced by an addition or edit automatically.
66
/// extensions that might be affected by these changes, for a lack of finesse with our edits.
7-
///
8-
/// `filter_paths` is an optional filter that allows to specify which paths should be considered for the update.
9-
/// If `None`, all paths are considered.
107
pub fn apply_lhs_to_rhs(
118
workdir: &Path,
129
lhs: &gix::index::State,
1310
rhs: &mut gix::index::State,
14-
filter_paths: Option<HashSet<BString>>,
1511
) -> anyhow::Result<()> {
1612
let mut num_sorted_entries = rhs.entries().len();
1713
let mut needs_sorting = false;
@@ -31,12 +27,6 @@ pub fn apply_lhs_to_rhs(
3127

3228
use gix::diff::index::Change;
3329
for change in changes {
34-
if let Some(filter_paths) = &filter_paths {
35-
if !filter_paths.contains(&change.location().to_owned()) {
36-
continue;
37-
}
38-
}
39-
4030
match change {
4131
Change::Addition { location, .. } => {
4232
delete_entry_by_path_bounded(rhs, location.as_bstr(), &mut num_sorted_entries);

crates/but-workspace/src/commit_engine/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ pub fn create_commit_and_update_refs(
577577
repo.workdir().expect("non-bare"),
578578
&tree_index,
579579
&mut disk_index,
580-
None,
581580
)?;
582581
out.index = disk_index.into();
583582
} else {

crates/gitbutler-oplog/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ gitbutler-branch.workspace = true
2424
gitbutler-serde.workspace = true
2525
gitbutler-fs.workspace = true
2626
gitbutler-reference.workspace = true
27-
gitbutler-diff.workspace = true
2827
gitbutler-stack.workspace = true
2928
but-core.workspace = true
3029

0 commit comments

Comments
 (0)