Skip to content

Commit 6da3599

Browse files
committed
[repository #190] fix build, lets just make traversal available by default
1 parent e5e3c80 commit 6da3599

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

git-repository/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ max-performance = ["git-features/zlib-ng-compat", "git-features/fast-sha1"]
2020
local-time-support = ["git-actor/local-time-support"]
2121
local = [
2222
"git-url",
23-
"git-traverse",
2423
"git-diff",
2524
"git-pack/pack-cache-lru-dynamic",
2625
"git-pack/pack-cache-lru-static",
@@ -49,7 +48,7 @@ git-actor = { version ="^0.5.0", path = "../git-actor" }
4948
git-pack = { version ="^0.10.0", path = "../git-pack" }
5049

5150
git-url = { version = "0.3.0", path = "../git-url", optional = true }
52-
git-traverse = { version ="^0.8.0", path = "../git-traverse", optional = true }
51+
git-traverse = { version ="^0.8.0", path = "../git-traverse" }
5352
git-protocol = { version ="^0.10.0", path = "../git-protocol", optional = true }
5453
git-diff = { version ="^0.9.0", path = "../git-diff", optional = true }
5554
git-features = { version = "^0.16.0", path = "../git-features", features = ["progress"] }

git-repository/src/ext/object_id.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#![allow(missing_docs)]
22
use git_hash::ObjectId;
3-
#[cfg(feature = "git-traverse")]
43
use git_traverse::commit::ancestors::{Ancestors, State};
54

65
use crate::easy;
76

87
pub trait Sealed {}
98

109
pub trait ObjectIdExt: Sealed {
11-
#[cfg(feature = "git-traverse")]
1210
fn ancestors_iter<Find>(self, find: Find) -> Ancestors<Find, fn(&git_hash::oid) -> bool, State>
1311
where
1412
Find: for<'a> FnMut(&git_hash::oid, &'a mut Vec<u8>) -> Option<git_object::CommitRefIter<'a>>;
@@ -19,7 +17,6 @@ pub trait ObjectIdExt: Sealed {
1917
impl Sealed for ObjectId {}
2018

2119
impl ObjectIdExt for ObjectId {
22-
#[cfg(feature = "git-traverse")]
2320
fn ancestors_iter<Find>(self, find: Find) -> Ancestors<Find, fn(&git_hash::oid) -> bool, State>
2421
where
2522
Find: for<'a> FnMut(&git_hash::oid, &'a mut Vec<u8>) -> Option<git_object::CommitRefIter<'a>>,

git-repository/src/ext/tree.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#![allow(missing_docs)]
2-
#[cfg(feature = "git-diff")]
32
use std::borrow::BorrowMut;
43

5-
#[cfg(feature = "git-diff")]
64
use git_hash::oid;
75
use git_object::TreeRefIter;
8-
#[cfg(feature = "git-traverse")]
96
use git_traverse::tree::breadthfirst;
107

118
pub trait Sealed {}
@@ -25,7 +22,6 @@ pub trait TreeIterExt: Sealed {
2522
StateMut: BorrowMut<git_diff::tree::State>;
2623

2724
/// Use this for squeezing out the last bits of performance.
28-
#[cfg(feature = "git-traverse")]
2925
fn traverse<StateMut, Find, V>(
3026
&self,
3127
state: StateMut,
@@ -57,7 +53,6 @@ impl<'d> TreeIterExt for TreeRefIter<'d> {
5753
git_diff::tree::Changes::from(Some(self.clone())).needed_to_obtain(other, state, find, delegate)
5854
}
5955

60-
#[cfg(feature = "git-traverse")]
6156
fn traverse<StateMut, Find, V>(
6257
&self,
6358
state: StateMut,

git-repository/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub use git_protocol as protocol;
104104
pub use git_ref as refs;
105105
#[cfg(feature = "unstable")]
106106
pub use git_tempfile as tempfile;
107-
#[cfg(all(feature = "unstable", feature = "git-traverse"))]
107+
#[cfg(feature = "unstable")]
108108
pub use git_traverse as traverse;
109109
#[cfg(all(feature = "unstable", feature = "git-url"))]
110110
pub use git_url as url;

0 commit comments

Comments
 (0)