File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -871,7 +871,10 @@ mod test {
871871 #[ test]
872872 fn test_resolve_cache_dir_default_returns_relative_path ( ) {
873873 let tmp_dir = TempDir :: new ( ) . unwrap ( ) ;
874- let repo_root = AbsoluteSystemPathBuf :: try_from ( tmp_dir. path ( ) ) . unwrap ( ) ;
874+ let repo_root = AbsoluteSystemPathBuf :: try_from ( tmp_dir. path ( ) )
875+ . unwrap ( )
876+ . to_realpath ( )
877+ . unwrap ( ) ;
875878
876879 // Initialize git repo
877880 std:: process:: Command :: new ( "git" )
Original file line number Diff line number Diff line change @@ -186,8 +186,8 @@ mod tests {
186186 // from git ls-tree output.
187187 #[ test]
188188 fn test_ls_tree_sorted ( ) {
189- let input = "100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\t package.json\0 100644 \
190- blob 5b999efa470b056e329b4c23a73904e0794bdc2f\t src/index.ts\0 100644 blob \
189+ let input = "100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\t package.json\x00 100644 \
190+ blob 5b999efa470b056e329b4c23a73904e0794bdc2f\t src/index.ts\x00 100644 blob \
191191 f44f57fff95196c5f7139dfa0b96875f1e9650a9\t src/utils.ts\0 ";
192192
193193 let expected = to_sorted_hashes ( & [
Original file line number Diff line number Diff line change @@ -52,12 +52,7 @@ impl WorktreeInfo {
5252 let worktree_root = repo
5353 . workdir ( )
5454 . ok_or_else ( || Error :: git_error ( "bare repository has no workdir" ) ) ?;
55- let worktree_root = AbsoluteSystemPathBuf :: try_from (
56- worktree_root
57- . canonicalize ( )
58- . map_err ( |e| Error :: git_error ( format ! ( "failed to canonicalize workdir: {e}" ) ) ) ?
59- . as_path ( ) ,
60- ) ?;
55+ let worktree_root = AbsoluteSystemPathBuf :: try_from ( worktree_root) ?. to_realpath ( ) ?;
6156
6257 let git_common_dir = repo. commondir ( ) . to_string_lossy ( ) . to_string ( ) ;
6358
You can’t perform that action at this time.
0 commit comments