summaryrefslogtreecommitdiffstats
path: root/extra/git2/src/revspec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'extra/git2/src/revspec.rs')
-rw-r--r--extra/git2/src/revspec.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/extra/git2/src/revspec.rs b/extra/git2/src/revspec.rs
deleted file mode 100644
index d2e08670a..000000000
--- a/extra/git2/src/revspec.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use crate::{Object, RevparseMode};
-
-/// A revspec represents a range of revisions within a repository.
-pub struct Revspec<'repo> {
- from: Option<Object<'repo>>,
- to: Option<Object<'repo>>,
- mode: RevparseMode,
-}
-
-impl<'repo> Revspec<'repo> {
- /// Assembles a new revspec from the from/to components.
- pub fn from_objects(
- from: Option<Object<'repo>>,
- to: Option<Object<'repo>>,
- mode: RevparseMode,
- ) -> Revspec<'repo> {
- Revspec { from, to, mode }
- }
-
- /// Access the `from` range of this revspec.
- pub fn from(&self) -> Option<&Object<'repo>> {
- self.from.as_ref()
- }
-
- /// Access the `to` range of this revspec.
- pub fn to(&self) -> Option<&Object<'repo>> {
- self.to.as_ref()
- }
-
- /// Returns the intent of the revspec.
- pub fn mode(&self) -> RevparseMode {
- self.mode
- }
-}