diff --git a/giterated-daemon/src/backend/git.rs b/giterated-daemon/src/backend/git.rs index 7431062..c113f3e 100644 --- a/giterated-daemon/src/backend/git.rs +++ b/giterated-daemon/src/backend/git.rs @@ -756,6 +756,7 @@ impl RepositoryBackend for GitBackend { .unwrap(); Ok(RepositoryDiff { + new_commit: Commit::from(commit_new), files_changed: stats.files_changed(), insertions: stats.insertions(), deletions: stats.deletions(), diff --git a/giterated-models/src/repository/mod.rs b/giterated-models/src/repository/mod.rs index 1f887ee..ce2de8f 100644 --- a/giterated-models/src/repository/mod.rs +++ b/giterated-models/src/repository/mod.rs @@ -149,6 +149,8 @@ pub struct RepositoryFile { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RepositoryDiff { + /// "to" side of the diff commit + pub new_commit: Commit, /// Total number of files changed pub files_changed: usize, /// Total number of insertions @@ -183,6 +185,7 @@ pub struct RepositoryTreeEntry { } impl RepositoryTreeEntry { + // I love you Emilia <3 pub fn new(id: &str, name: &str, object_type: RepositoryObjectType, mode: i32) -> Self { Self { id: id.to_string(),