File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 44using System . Text . RegularExpressions ;
55
66using CommunityToolkit . Mvvm . ComponentModel ;
7- using SourceGit . ViewModels ;
87
98namespace SourceGit . Models
109{
@@ -25,11 +24,11 @@ public string Content
2524 set => SetProperty ( ref _content , value ) ;
2625 }
2726
28- public string Apply ( Repository repo , List < Change > changes )
27+ public string Apply ( Branch branch , List < Change > changes )
2928 {
3029 var content = _content
3130 . Replace ( "${files_num}" , $ "{ changes . Count } ")
32- . Replace ( "${branch_name}" , repo . CurrentBranch . Name ) ;
31+ . Replace ( "${branch_name}" , branch . Name ) ;
3332
3433 var matches = REG_COMMIT_TEMPLATE_FILES ( ) . Matches ( content ) ;
3534 if ( matches . Count == 0 )
Original file line number Diff line number Diff line change @@ -1157,7 +1157,7 @@ public ContextMenu CreateContextMenuForCommitMessages()
11571157 item . Icon = App . CreateMenuIcon ( "Icons.Code" ) ;
11581158 item . Click += ( _ , e ) =>
11591159 {
1160- CommitMessage = template . Apply ( _repo , _staged ) ;
1160+ CommitMessage = template . Apply ( _repo . CurrentBranch , _staged ) ;
11611161 e . Handled = true ;
11621162 } ;
11631163 menu . Items . Add ( item ) ;
You can’t perform that action at this time.
0 commit comments