@@ -227,7 +227,7 @@ impl sum_tree::Item for StatusEntry {
227227
228228 fn summary ( & self , _: <Self :: Summary as sum_tree:: Summary >:: Context < ' _ > ) -> Self :: Summary {
229229 PathSummary {
230- max_path : self . repo_path . 0 . clone ( ) ,
230+ max_path : self . repo_path . as_ref ( ) . clone ( ) ,
231231 item_summary : self . status . summary ( ) ,
232232 }
233233 }
@@ -237,7 +237,7 @@ impl sum_tree::KeyedItem for StatusEntry {
237237 type Key = PathKey ;
238238
239239 fn key ( & self ) -> Self :: Key {
240- PathKey ( self . repo_path . 0 . clone ( ) )
240+ PathKey ( self . repo_path . as_ref ( ) . clone ( ) )
241241 }
242242}
243243
@@ -990,7 +990,7 @@ impl GitStore {
990990 RepositoryState :: Local { backend, .. } => backend
991991 . blame ( repo_path. clone ( ) , content)
992992 . await
993- . with_context ( || format ! ( "Failed to blame {:?}" , repo_path. 0 ) )
993+ . with_context ( || format ! ( "Failed to blame {:?}" , repo_path. as_ref ( ) ) )
994994 . map ( Some ) ,
995995 RepositoryState :: Remote { project_id, client } => {
996996 let response = client
@@ -2376,7 +2376,7 @@ impl GitStore {
23762376 . entries
23772377 . into_iter ( )
23782378 . map ( |( path, status) | proto:: TreeDiffStatus {
2379- path : path. 0 . to_proto ( ) ,
2379+ path : path. as_ref ( ) . to_proto ( ) ,
23802380 status : match status {
23812381 TreeDiffStatus :: Added { } => proto:: tree_diff_status:: Status :: Added . into ( ) ,
23822382 TreeDiffStatus :: Modified { .. } => {
@@ -3152,13 +3152,13 @@ impl RepositorySnapshot {
31523152
31533153 pub fn status_for_path ( & self , path : & RepoPath ) -> Option < StatusEntry > {
31543154 self . statuses_by_path
3155- . get ( & PathKey ( path. 0 . clone ( ) ) , ( ) )
3155+ . get ( & PathKey ( path. as_ref ( ) . clone ( ) ) , ( ) )
31563156 . cloned ( )
31573157 }
31583158
31593159 pub fn pending_ops_for_path ( & self , path : & RepoPath ) -> Option < PendingOps > {
31603160 self . pending_ops_by_path
3161- . get ( & PathKey ( path. 0 . clone ( ) ) , ( ) )
3161+ . get ( & PathKey ( path. as_ref ( ) . clone ( ) ) , ( ) )
31623162 . cloned ( )
31633163 }
31643164
@@ -4727,7 +4727,9 @@ impl Repository {
47274727 }
47284728 } ;
47294729 Some ( (
4730- RepoPath ( RelPath :: from_proto ( & entry. path ) . log_err ( ) ?) ,
4730+ RepoPath :: from_rel_path (
4731+ & RelPath :: from_proto ( & entry. path ) . log_err ( ) ?,
4732+ ) ,
47314733 status,
47324734 ) )
47334735 } )
@@ -5289,7 +5291,8 @@ impl Repository {
52895291 let mut cursor = prev_statuses. cursor :: < PathProgress > ( ( ) ) ;
52905292 for path in changed_paths. into_iter ( ) {
52915293 if cursor. seek_forward ( & PathTarget :: Path ( & path) , Bias :: Left ) {
5292- changed_path_statuses. push ( Edit :: Remove ( PathKey ( path. 0 ) ) ) ;
5294+ changed_path_statuses
5295+ . push ( Edit :: Remove ( PathKey ( path. as_ref ( ) . clone ( ) ) ) ) ;
52935296 }
52945297 }
52955298 changed_path_statuses
@@ -5435,10 +5438,8 @@ fn get_permalink_in_rust_registry_src(
54355438 remote,
54365439 BuildPermalinkParams :: new (
54375440 & cargo_vcs_info. git . sha1 ,
5438- & RepoPath (
5439- RelPath :: new ( & path, PathStyle :: local ( ) )
5440- . context ( "invalid path" ) ?
5441- . into_arc ( ) ,
5441+ & RepoPath :: from_rel_path (
5442+ & RelPath :: new ( & path, PathStyle :: local ( ) ) . context ( "invalid path" ) ?,
54425443 ) ,
54435444 Some ( selection) ,
54445445 ) ,
@@ -5640,7 +5641,11 @@ async fn compute_snapshot(
56405641 let mut events = Vec :: new ( ) ;
56415642 let branches = backend. branches ( ) . await ?;
56425643 let branch = branches. into_iter ( ) . find ( |branch| branch. is_head ) ;
5643- let statuses = backend. status ( & [ RelPath :: empty ( ) . into ( ) ] ) . await ?;
5644+ let statuses = backend
5645+ . status ( & [ RepoPath :: from_rel_path (
5646+ & RelPath :: new ( "." . as_ref ( ) , PathStyle :: local ( ) ) . unwrap ( ) ,
5647+ ) ] )
5648+ . await ?;
56445649 let stash_entries = backend. stash_entries ( ) . await ?;
56455650 let statuses_by_path = SumTree :: from_iter (
56465651 statuses
0 commit comments