Skip to content

Commit

Permalink
fix: commit only staged files, again
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Jul 17, 2022
1 parent 4264828 commit ba35555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ export default class ObsidianGit extends Plugin {
} else {
status = await this.gitManager.status();
}
const changedFiles = status.changed; + status.staged;
const changedFiles = status.changed.length + status.staged.length;

if (changedFiles.length !== 0) {
if (changedFiles !== 0) {
let commitMessage = fromAutoBackup ? this.settings.autoCommitMessage : this.settings.commitMessage;
if ((fromAutoBackup && this.settings.customMessageOnAutoBackup) || requestCustomMessage) {
if (!this.settings.disablePopups && fromAutoBackup) {
Expand Down

0 comments on commit ba35555

Please sign in to comment.