Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskane committed Feb 11, 2023
1 parent b18b523 commit e569105
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions asyncgit/src/sync/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::{
io::Write,
path::{Path, PathBuf},
};

///
#[derive(PartialEq, Eq, Debug, Clone)]
pub struct Head {
Expand Down Expand Up @@ -49,9 +48,11 @@ pub fn repo_dir(repo_path: &RepoPath) -> Result<PathBuf> {
pub fn repo_work_dir(repo_path: &RepoPath) -> Result<String> {
let repo = repo(repo_path)?;

// TODO: Is this safe?
// Allow Bare repositories
if repo.is_bare() { return Ok(repo_path.gitpath().to_str().unwrap().to_string()) };
// TODO: Is this safe?
// Allow Bare repositories
if repo.is_bare() {
return Ok(repo_path.gitpath().to_str().unwrap().to_string());
};

work_dir(&repo)?.to_str().map_or_else(
|| Err(Error::Generic("invalid workdir".to_string())),
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/worktrees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl WorkTreesTab {
Self {
visible: false,
worktrees: WorkTreesComponent::new(
"Hello Worktrees",
"Worktree",
theme,
key_config.clone(),
),
Expand Down

0 comments on commit e569105

Please sign in to comment.