File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ pub fn worktrees(repo_path: &RepoPath) -> Result<Vec<WorkTree>> {
5252 WorktreeLockStatus :: Locked ( _) => true ,
5353 } ,
5454 is_prunable : wt. is_prunable ( None ) ?,
55- is_current : wt. path ( ) == repo_path. gitpath ( ) ,
55+ is_current : wt. path ( ) . canonicalize ( ) ?
56+ == repo_path. gitpath ( ) . canonicalize ( ) ?,
5657 } )
5758 } )
5859 . filter_map ( |s : Result < WorkTree > | {
@@ -89,6 +90,7 @@ pub fn create_worktree(
8990 let repo_obj = repo ( repo_path) ?;
9091 let path_str = repo_path. gitpath ( ) . to_str ( ) . unwrap ( ) ;
9192
93+ // WARNING:
9294 // if we are in a worktree assume we want to create a worktree in the parent directory
9395 // This is not always accurate but it should work in most cases
9496 let real_path = match repo_obj. is_worktree ( ) {
You can’t perform that action at this time.
0 commit comments