Technically it doesn't depend on it.
Unified · Split
| @@ -67,7 +67,6 @@ mod object; · 66 unmodified lines | |||
| 67 | mod pathspec; | 67 | mod pathspec; |
| 68 | mod reference; | 68 | mod reference; |
| 69 | mod remote; | 69 | mod remote; |
| 70 | #[cfg(feature = "revision")] | ||
| 71 | mod revision; | 70 | mod revision; |
| 72 | mod shallow; | 71 | mod shallow; |
| 73 | mod state; | 72 | mod state; |
| @@ -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}; | ||
| 2 | 4 | ||
| 3 | /// Methods for resolving revisions by spec or working with the commit graph. | 5 | /// Methods for resolving revisions by spec or working with the commit graph. |
| 4 | impl crate::Repository { | 6 | impl crate::Repository { |
| @@ -9,6 +11,7 @@ impl crate::Repository { · 4 unmodified lines | |||
| 9 | /// - `@` actually stands for `HEAD`, whereas `git` resolves it to the object pointed to by `HEAD` without making the | 11 | /// - `@` actually stands for `HEAD`, whereas `git` resolves it to the object pointed to by `HEAD` without making the |
| 10 | /// `HEAD` ref available for lookups. | 12 | /// `HEAD` ref available for lookups. |
| 11 | #[doc(alias = "revparse", alias = "git2")] | 13 | #[doc(alias = "revparse", alias = "git2")] |
| 14 | #[cfg(feature = "revision")] | ||
| 12 | pub fn rev_parse<'a>(&self, spec: impl Into<&'a BStr>) -> Result<revision::Spec<'_>, revision::spec::parse::Error> { | 15 | pub fn rev_parse<'a>(&self, spec: impl Into<&'a BStr>) -> Result<revision::Spec<'_>, revision::spec::parse::Error> { |
| 13 | revision::Spec::from_bstr( | 16 | revision::Spec::from_bstr( |
| 14 | spec, | 17 | spec, |
| @@ -22,6 +25,7 @@ impl crate::Repository { · 7 unmodified lines | |||
| 22 | 25 | ||
| 23 | /// Parse a revision specification and return single object id as represented by this instance. | 26 | /// Parse a revision specification and return single object id as represented by this instance. |
| 24 | #[doc(alias = "revparse_single", alias = "git2")] | 27 | #[doc(alias = "revparse_single", alias = "git2")] |
| 28 | #[cfg(feature = "revision")] | ||
| 25 | pub fn rev_parse_single<'repo, 'a>( | 29 | pub fn rev_parse_single<'repo, 'a>( |
| 26 | &'repo self, | 30 | &'repo self, |
| 27 | spec: impl Into<&'a BStr>, | 31 | spec: impl Into<&'a BStr>, |