@@ -21,12 +21,6 @@ public bool FirstRun
2121 return val ;
2222 }
2323 }
24-
25- [ SerializeField ] private string createdDate ;
26- public string CreatedDate
27- {
28- get { return createdDate ; }
29- }
3024 }
3125
3226 sealed class EnvironmentCache : ScriptObjectSingleton < EnvironmentCache >
@@ -83,15 +77,14 @@ public void Flush()
8377 }
8478 }
8579
86- [ Location ( "cache/branches.yaml" , LocationAttribute . Location . UserFolder ) ]
80+ [ Location ( "cache/branches.yaml" , LocationAttribute . Location . LibraryFolder ) ]
8781 sealed class BranchCache : ScriptObjectSingleton < BranchCache > , IBranchCache
8882 {
8983 [ SerializeField ] private List < GitBranch > localBranches ;
9084 [ SerializeField ] private List < GitBranch > remoteBranches ;
91- [ SerializeField ] private List < GitBranch > test ;
85+
9286 public BranchCache ( )
9387 {
94- test = new List < GitBranch > ( ) { new GitBranch ( "name" , "tracking" , false ) } ;
9588 }
9689
9790 public List < GitBranch > LocalBranches
@@ -104,7 +97,6 @@ public List<GitBranch> LocalBranches
10497 }
10598 set
10699 {
107- Logging . GetLogger ( ) . Debug ( "Saving branches {0}" , value . Join ( "," ) ) ;
108100 localBranches = value ;
109101 Save ( true ) ;
110102 }
@@ -125,7 +117,7 @@ public List<GitBranch> RemoteBranches
125117 }
126118 }
127119
128- [ Location ( "views/branches.yaml" , LocationAttribute . Location . UserFolder ) ]
120+ [ Location ( "views/branches.yaml" , LocationAttribute . Location . LibraryFolder ) ]
129121 sealed class Favourites : ScriptObjectSingleton < Favourites >
130122 {
131123 [ SerializeField ] private List < string > favouriteBranches ;
@@ -174,4 +166,27 @@ public bool IsFavourite(string branchName)
174166 return FavouriteBranches . Contains ( branchName ) ;
175167 }
176168 }
169+
170+ [ Location ( "cache/gitlog.yaml" , LocationAttribute . Location . LibraryFolder ) ]
171+ sealed class GitLogCache : ScriptObjectSingleton < GitLogCache >
172+ {
173+ [ SerializeField ] private List < GitLogEntry > log ;
174+ public GitLogCache ( )
175+ { }
176+
177+ public List < GitLogEntry > Log
178+ {
179+ get
180+ {
181+ if ( log == null )
182+ log = new List < GitLogEntry > ( ) ;
183+ return log ;
184+ }
185+ set
186+ {
187+ log = value ;
188+ Save ( true ) ;
189+ }
190+ }
191+ }
177192}
0 commit comments