File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -769,26 +769,19 @@ private void UpdateInProgressState()
769769 else
770770 InProgressContext = null ;
771771
772- if ( _inProgressContext == null )
773- {
774- LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "MERGE_MSG" ) ) ;
772+ if ( _inProgressContext != null && _inProgressContext . GetType ( ) == oldType && ! string . IsNullOrEmpty ( _commitMessage ) )
775773 return ;
776- }
777774
778- if ( _inProgressContext . GetType ( ) == oldType && ! string . IsNullOrEmpty ( _commitMessage ) )
775+ if ( LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "MERGE_MSG" ) ) )
779776 return ;
780777
781- do
782- {
783- if ( LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "MERGE_MSG" ) ) )
784- break ;
778+ if ( _inProgressContext is not RebaseInProgress { } rebasing )
779+ return ;
785780
786- if ( LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "rebase-merge" , "message" ) ) )
787- break ;
781+ if ( LoadCommitMessageFromFile ( Path . Combine ( _repo . GitDir , "rebase-merge" , "message" ) ) )
782+ return ;
788783
789- if ( _inProgressContext is RebaseInProgress { StoppedAt : { } stopAt } )
790- CommitMessage = new Commands . QueryCommitFullMessage ( _repo . FullPath , stopAt . SHA ) . GetResult ( ) ;
791- } while ( false ) ;
784+ CommitMessage = new Commands . QueryCommitFullMessage ( _repo . FullPath , rebasing . StoppedAt . SHA ) . GetResult ( ) ;
792785 }
793786
794787 private bool LoadCommitMessageFromFile ( string file )
You can’t perform that action at this time.
0 commit comments