Skip to content

Commit 05e719b

Browse files
author
Daniel Davis
committed
Changing auto-fill commit message to check for getMergeMessage OR getSquashMessage
1 parent 3f90d90 commit 05e719b

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

extensions/git/src/repository.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,10 @@ export class Repository implements Disposable {
865865
}
866866

867867
async getInputTemplate(): Promise<string> {
868-
const mergeMessage = await this.repository.getMergeMessage();
869-
const squashMessage = await this.repository.getSquashMessage();
868+
const commitMessage = await this.repository.getMergeMessage() || await this.repository.getSquashMessage();
870869

871-
if (mergeMessage) {
872-
return mergeMessage;
873-
} else if (squashMessage) {
874-
return squashMessage;
870+
if (commitMessage) {
871+
return commitMessage;
875872
}
876873

877874
return await this.repository.getCommitTemplate();

0 commit comments

Comments
 (0)