aboutsummaryrefslogtreecommitdiff
path: root/apps/servers/octopus/supergit/src/commit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/servers/octopus/supergit/src/commit.rs')
-rw-r--r--apps/servers/octopus/supergit/src/commit.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/servers/octopus/supergit/src/commit.rs b/apps/servers/octopus/supergit/src/commit.rs
index 58b57ce22f73..b88e01331d95 100644
--- a/apps/servers/octopus/supergit/src/commit.rs
+++ b/apps/servers/octopus/supergit/src/commit.rs
@@ -1,6 +1,9 @@
use crate::{files::FileTree, Diff, HashId};
use git2::Repository;
-use std::sync::Arc;
+use std::{
+ fmt::{self, Debug, Formatter},
+ sync::Arc,
+};
/// Represent a commit on a repository
///
@@ -12,6 +15,12 @@ pub struct Commit {
repo: Arc<Repository>,
}
+impl Debug for Commit {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ write!(f, "{}", self.id)
+ }
+}
+
impl Commit {
/// Create a commit object and check if it exists in the repo
pub(crate) fn new(r: &Arc<Repository>, id: HashId) -> Option<Self> {