This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import ModelStateRegistry from '../models/model-state-registry';
1111import { readFile } from '../helpers' ;
1212
1313const COMMIT_GRAMMAR_SCOPE = 'text.git-commit' ;
14+ const ATOM_COMMIT_EDITMSG_PATH = path . join ( this . props . repository . getGitDirectoryPath ( ) , 'ATOM_COMMIT_EDITMSG' ) ;
1415
1516export default class CommitViewController {
1617 static focus = {
@@ -115,8 +116,7 @@ export default class CommitViewController {
115116
116117 @autobind
117118 async openCommitEditor ( messageFromBox ) {
118- const atomCommitMessagePath = path . join ( this . props . repository . getGitDirectoryPath ( ) , 'ATOM_COMMIT_EDITMSG' ) ;
119- const editor = await this . props . workspace . open ( atomCommitMessagePath ) ;
119+ const editor = await this . props . workspace . open ( ATOM_COMMIT_EDITMSG_PATH ) ;
120120 editor . setText ( messageFromBox ) ;
121121 this . deactivateCommitBox = true ;
122122
@@ -130,7 +130,7 @@ export default class CommitViewController {
130130 etch . update ( this ) ;
131131
132132 this . editorSubscription = editor . onDidDestroy ( async ( ) => {
133- const contents = await readFile ( atomCommitMessagePath ) ;
133+ const contents = await readFile ( ATOM_COMMIT_EDITMSG_PATH ) ;
134134 this . regularCommitMessage = contents ;
135135 this . deactivateCommitBox = false ;
136136 this . editorSubscription . dispose ( ) ;
You can’t perform that action at this time.
0 commit comments