Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Borwe committed Jan 13, 2024
1 parent 810ccd9 commit ae07aa8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ export class Presenter {
let disposable = vscode.commands.registerCommand('save-me-baby.start-saving', () => {
this._enabled=true;
this.disposableForOnSaveListener = vscode.workspace.onDidSaveTextDocument((doc)=>{
//get the parent dir of the file
const parent_dir = getParentDir(doc.uri)
if(dirIsGit(parent_dir)){
//if so then go and get last git log
let lastLog = dirGetLastLogMessage(parent_dir)
//create git commit
this.gitCommit(lastLog, doc.uri)
if(this._enabled){
//get the parent dir of the file
const parent_dir = getParentDir(doc.uri)
if(dirIsGit(parent_dir)){
//if so then go and get last git log
let lastLog = dirGetLastLogMessage(parent_dir)
//create git commit
this.gitCommit(lastLog, doc.uri)
}
//Letter have a setting to allow initializing repo incase no git
}
//Letter have a setting to allow initializing repo incase no git
})
vscode.window.showInformationMessage('Starting to Save You 😄!');
return true;
Expand Down

0 comments on commit ae07aa8

Please sign in to comment.