move virtual branch files impl our of core

This commit is contained in:
Kiril Videlov 2024-07-07 20:35:26 +02:00
parent da9f495816
commit 3d0455f12b
No known key found for this signature in database
GPG Key ID: A4C733025427C471
5 changed files with 8 additions and 7 deletions

View File

@ -21,9 +21,10 @@ use crate::base::{
use super::r#virtual as branch;
use gitbutler_core::virtual_branches;
use crate::files::RemoteBranchFile;
use gitbutler_core::virtual_branches::{
branch::{BranchId, BranchOwnershipClaims},
target, RemoteBranchFile, VirtualBranchesHandle,
target, VirtualBranchesHandle,
};
use gitbutler_core::{
git,
@ -127,7 +128,7 @@ impl Controller {
commit_oid: git2::Oid,
) -> Result<Vec<RemoteBranchFile>> {
let project_repository = Repository::open(project)?;
virtual_branches::list_remote_commit_files(project_repository.repo(), commit_oid)
crate::files::list_remote_commit_files(project_repository.repo(), commit_oid)
.map_err(Into::into)
}

View File

@ -3,7 +3,7 @@ use std::path;
use anyhow::{anyhow, Context, Result};
use serde::Serialize;
use crate::git::diff;
use gitbutler_core::git::diff;
#[derive(Debug, PartialEq, Clone, Serialize)]
#[serde(rename_all = "camelCase")]

View File

@ -10,3 +10,5 @@ pub mod assets;
pub mod base;
pub mod integration;
pub mod files;

View File

@ -2,9 +2,6 @@ pub mod branch;
pub use branch::{Branch, BranchId};
pub mod target;
mod files;
pub use files::*;
mod remote;
pub use remote::*;

View File

@ -2,6 +2,7 @@ pub mod commands {
use crate::error::Error;
use anyhow::{anyhow, Context};
use gitbutler_branch::base::BaseBranch;
use gitbutler_branch::files::RemoteBranchFile;
use gitbutler_branch::{Controller, NameConflitResolution, VirtualBranches};
use gitbutler_core::{
assets,
@ -11,7 +12,7 @@ pub mod commands {
types::ReferenceName,
virtual_branches::{
branch::{self, BranchId, BranchOwnershipClaims},
RemoteBranch, RemoteBranchData, RemoteBranchFile,
RemoteBranch, RemoteBranchData,
},
};
use tauri::{AppHandle, Manager};