@@ -61,7 +61,7 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext {
61
61
startIdx ,
62
62
endIdx ,
63
63
shouldShowGraph (c ),
64
- shouldShowTags ( c ),
64
+ shouldDisplayForScreenMode ( c , viewModel . showTags ),
65
65
c .Model ().BisectInfo ,
66
66
)
67
67
}
@@ -149,13 +149,17 @@ type LocalCommitsViewModel struct {
149
149
150
150
// If this is true we'll use git log --all when fetching the commits.
151
151
showWholeGitGraph bool
152
+
153
+ // If this is true we'll show tags in the commit list.
154
+ showTags string
152
155
}
153
156
154
157
func NewLocalCommitsViewModel (getModel func () []* models.Commit , c * ContextCommon ) * LocalCommitsViewModel {
155
158
self := & LocalCommitsViewModel {
156
159
ListViewModel : NewListViewModel (getModel ),
157
160
limitCommits : true ,
158
161
showWholeGitGraph : c .UserConfig ().Git .Log .ShowWholeGraph ,
162
+ showTags : c .UserConfig ().Git .Log .ShowTags ,
159
163
}
160
164
161
165
return self
@@ -239,6 +243,14 @@ func (self *LocalCommitsViewModel) SetShowWholeGitGraph(value bool) {
239
243
self .showWholeGitGraph = value
240
244
}
241
245
246
+ func (self * LocalCommitsContext ) GetShowTags () string {
247
+ return self .showTags
248
+ }
249
+
250
+ func (self * LocalCommitsViewModel ) SetShowTags (value string ) {
251
+ self .showTags = value
252
+ }
253
+
242
254
func (self * LocalCommitsViewModel ) GetShowWholeGitGraph () bool {
243
255
return self .showWholeGitGraph
244
256
}
@@ -248,14 +260,10 @@ func (self *LocalCommitsViewModel) GetCommits() []*models.Commit {
248
260
}
249
261
250
262
func shouldShowGraph (c * ContextCommon ) bool {
251
- return shouldShowBasedOnAppState (c , c .GetAppState ().GitLogShowGraph )
252
- }
253
-
254
- func shouldShowTags (c * ContextCommon ) bool {
255
- return shouldShowBasedOnAppState (c , c .GetAppState ().GitLogShowTags )
263
+ return shouldDisplayForScreenMode (c , c .GetAppState ().GitLogShowGraph )
256
264
}
257
265
258
- func shouldShowBasedOnAppState (c * ContextCommon , value string ) bool {
266
+ func shouldDisplayForScreenMode (c * ContextCommon , value string ) bool {
259
267
if c .Modes ().Filtering .Active () {
260
268
return false
261
269
}
0 commit comments