Skip to content

Commit c515edd

Browse files
committed
fix: make rev_walk available even without the revision feature.
Technically it doesn't depend on it.
1 parent 46cd1ae commit c515edd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gix/src/repository/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ mod object;
6767
mod pathspec;
6868
mod reference;
6969
mod remote;
70-
#[cfg(feature = "revision")]
7170
mod revision;
7271
mod shallow;
7372
mod state;

gix/src/repository/revision.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::{bstr::BStr, revision, Id};
1+
use crate::revision;
2+
#[cfg(feature = "revision")]
3+
use crate::{bstr::BStr, Id};
24

35
/// Methods for resolving revisions by spec or working with the commit graph.
46
impl crate::Repository {
@@ -9,6 +11,7 @@ impl crate::Repository {
911
/// - `@` actually stands for `HEAD`, whereas `git` resolves it to the object pointed to by `HEAD` without making the
1012
/// `HEAD` ref available for lookups.
1113
#[doc(alias = "revparse", alias = "git2")]
14+
#[cfg(feature = "revision")]
1215
pub fn rev_parse<'a>(&self, spec: impl Into<&'a BStr>) -> Result<revision::Spec<'_>, revision::spec::parse::Error> {
1316
revision::Spec::from_bstr(
1417
spec,
@@ -22,6 +25,7 @@ impl crate::Repository {
2225

2326
/// Parse a revision specification and return single object id as represented by this instance.
2427
#[doc(alias = "revparse_single", alias = "git2")]
28+
#[cfg(feature = "revision")]
2529
pub fn rev_parse_single<'repo, 'a>(
2630
&'repo self,
2731
spec: impl Into<&'a BStr>,

0 commit comments

Comments
 (0)