11use crate :: git:: graph:: { DiffStat , GraphRow } ;
22use crate :: git:: status:: RepoStatus ;
3+ use crate :: repo_id:: RepoId ;
34
45#[ derive( Clone , Debug ) ]
56#[ allow( dead_code) ]
@@ -10,13 +11,13 @@ pub(crate) enum Action {
1011 Resize ( u16 , u16 ) ,
1112 SelectNextRepo ,
1213 SelectPrevRepo ,
13- SelectRepo ( usize ) ,
14+ SelectRepo ( RepoId ) ,
1415 RepoStatusUpdated {
15- index : usize ,
16+ id : RepoId ,
1617 status : RepoStatus ,
1718 } ,
1819 RefreshAll ,
19- RefreshRepo ( usize ) ,
20+ RefreshRepo ( RepoId ) ,
2021 /// Fast local status poll (no spinner, no fetch)
2122 PollLocal ,
2223 /// Remote fetch poll (no spinner)
@@ -32,31 +33,35 @@ pub(crate) enum Action {
3233 stats : Vec < ( git2:: Oid , DiffStat ) > ,
3334 } ,
3435 ShowContextMenu {
35- index : usize ,
36+ id : RepoId ,
3637 row : u16 ,
3738 col : u16 ,
3839 } ,
3940 HideContextMenu ,
40- CopyPath ( usize ) ,
41- GitPush ( usize ) ,
42- GitPull ( usize ) ,
43- GitPullRebase ( usize ) ,
44- GitPullSubmodules ( usize ) ,
45- GitSubmoduleUpdate ( usize ) ,
46- GitSubmoduleSync ( usize ) ,
47- GitSubmoduleUpdateLatest ( usize ) ,
41+ CopyPath ( RepoId ) ,
42+ GitPush ( RepoId ) ,
43+ GitPull ( RepoId ) ,
44+ GitPullRebase ( RepoId ) ,
45+ GitPullSubmodules ( RepoId ) ,
46+ GitSubmoduleUpdate ( RepoId ) ,
47+ GitSubmoduleSync ( RepoId ) ,
48+ GitSubmoduleUpdateLatest ( RepoId ) ,
4849 GitOpComplete {
49- index : usize ,
50+ id : RepoId ,
5051 message : String ,
5152 } ,
52- ShowDiff ( usize , std:: path:: PathBuf ) ,
53- DiffLoaded ( String ) ,
53+ ShowDiff ( RepoId , std:: path:: PathBuf ) ,
54+ DiffLoaded {
55+ generation : u64 ,
56+ content : String ,
57+ } ,
5458 GraphError ( String ) ,
5559 ShowCommitFiles {
5660 repo_path : std:: path:: PathBuf ,
5761 oid : String ,
5862 } ,
5963 CommitFilesLoaded {
64+ generation : u64 ,
6065 oid : String ,
6166 message : String ,
6267 files : Vec < ( String , String ) > ,
@@ -66,14 +71,17 @@ pub(crate) enum Action {
6671 oid : String ,
6772 file_path : String ,
6873 } ,
69- CommitDiffLoaded ( String ) ,
74+ CommitDiffLoaded {
75+ generation : u64 ,
76+ content : String ,
77+ } ,
7078 OpenAddRepo ,
7179 AddRepo ( std:: path:: PathBuf ) ,
72- RemoveRepo ( usize ) ,
80+ RemoveRepo ( RepoId ) ,
7381 CycleSortOrder ,
7482 RescanRepos ,
7583 Error ( String ) ,
7684 UpdateAvailable ( String ) ,
7785 /// Clears the pending_status flag for a repo (sent on error paths)
78- StatusQueryDone ( usize ) ,
86+ StatusQueryDone ( RepoId ) ,
7987}
0 commit comments