File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -567,7 +567,11 @@ public void Close()
567567
568568 if ( ! _isWorktree )
569569 {
570- _settings . LastCommitMessage = _workingCopy . CommitMessage ;
570+ if ( _workingCopy . InProgressContext != null && ! string . IsNullOrEmpty ( _workingCopy . CommitMessage ) )
571+ File . WriteAllText ( Path . Combine ( GitDir , "MERGE_MSG" ) , _workingCopy . CommitMessage ) ;
572+ else
573+ _settings . LastCommitMessage = _workingCopy . CommitMessage ;
574+
571575 using var stream = File . Create ( Path . Combine ( _gitCommonDir , "sourcegit.settings" ) ) ;
572576 JsonSerializer . Serialize ( stream , _settings , JsonCodeGen . Default . RepositorySettings ) ;
573577 }
Original file line number Diff line number Diff line change @@ -796,13 +796,8 @@ private void UpdateInProgressState()
796796 if ( LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "rebase-merge" , "message" ) ) )
797797 break ;
798798
799- var rebaseProcessingFile = Path . Combine ( _repo . GitDir , "rebase-apply" , "final-commit" ) ;
800- if ( File . Exists ( rebaseProcessingFile ) )
801- {
802- var sha = File . ReadAllText ( rebaseProcessingFile ) ;
803- if ( ! string . IsNullOrEmpty ( sha ) )
804- CommitMessage = new Commands . QueryCommitFullMessage ( _repo . FullPath , sha ) . GetResult ( ) ;
805- }
799+ if ( _inProgressContext is RebaseInProgress { StoppedAt : { } stopAt } )
800+ CommitMessage = new Commands . QueryCommitFullMessage ( _repo . FullPath , stopAt . SHA ) . GetResult ( ) ;
806801 } while ( false ) ;
807802 }
808803
You can’t perform that action at this time.
0 commit comments