From c9f7ea04948f273768b85afc12d2f2a9c697c4f6 Mon Sep 17 00:00:00 2001 From: GitButler Date: Wed, 13 Mar 2024 15:31:04 +0100 Subject: [PATCH] GitButler Integration Commit This is an integration commit for the virtual branches that GitButler is tracking. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: - Virtual branch 7 (refs/gitbutler/Virtual-branch-7) branch head: 8111cbe7994127d7c50f2ba164d06ae34f1dd302 - gitbutler-app/src/project_repository/conflicts.rs - gitbutler-app/src/virtual_branches/virtual.rs - Virtual branch 8 (refs/gitbutler/Virtual-branch-8) - gitbutler-app/src/project_repository/conflicts.rs Your previous branch was: refs/heads/exec-stuff The sha for that commit was: 2bd1e8748628648e96d925b3bdba7572ce9ae734 For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch --- gitbutler-app/src/project_repository/conflicts.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gitbutler-app/src/project_repository/conflicts.rs b/gitbutler-app/src/project_repository/conflicts.rs index a8f0a0007..8b283b7ed 100644 --- a/gitbutler-app/src/project_repository/conflicts.rs +++ b/gitbutler-app/src/project_repository/conflicts.rs @@ -21,8 +21,8 @@ pub fn mark(repository: &Repository, paths: &[String], parent: Option) // write all the file paths to a file on disk let mut file = std::fs::File::create(conflicts_path)?; for path in paths { - file.write_all(path.as_bytes()).unwrap(); - file.write_all(b"\n").unwrap(); + file.write_all(path.as_ref().as_os_str().as_encoded_bytes())?; + file.write_all(b"\n")?; } if let Some(parent) = parent { @@ -85,7 +85,7 @@ pub fn conflicting_files(repository: &Repository) -> Result> { Ok(reader.lines().map_while(Result::ok).collect()) } -pub fn is_conflicting(repository: &Repository, path: Option<&str>) -> Result { +pub fn is_conflicting>(repository: &Repository, path: Option

) -> Result { let conflicts_path = repository.git_repository.path().join("conflicts"); if !conflicts_path.exists() { return Ok(false); @@ -103,7 +103,7 @@ pub fn is_conflicting(repository: &Repository, path: Option<&str>) -> Result