@@ -704,7 +704,7 @@ export default class ObsidianGit extends Plugin {
704
704
await this . saveData ( this . settings ) ;
705
705
}
706
706
707
- async saveLastAuto ( date : Date , mode : "backup" | "pull" | "push" ) {
707
+ saveLastAuto ( date : Date , mode : "backup" | "pull" | "push" ) {
708
708
if ( mode === "backup" ) {
709
709
this . localStorage . setLastAutoBackup ( date . toString ( ) ) ;
710
710
} else if ( mode === "pull" ) {
@@ -714,7 +714,7 @@ export default class ObsidianGit extends Plugin {
714
714
}
715
715
}
716
716
717
- async loadLastAuto ( ) : Promise < { backup : Date ; pull : Date ; push : Date } > {
717
+ loadLastAuto ( ) : { backup : Date ; pull : Date ; push : Date } {
718
718
return {
719
719
backup : new Date ( this . localStorage . getLastAutoBackup ( ) ?? "" ) ,
720
720
pull : new Date ( this . localStorage . getLastAutoPull ( ) ?? "" ) ,
@@ -982,7 +982,7 @@ export default class ObsidianGit extends Plugin {
982
982
} ) : Promise < boolean > {
983
983
if ( ! ( await this . isAllInitialized ( ) ) ) return false ;
984
984
985
- const hadConflict = this . localStorage . getConflict ( ) === "true" ;
985
+ let hadConflict = this . localStorage . getConflict ( ) === "true" ;
986
986
987
987
let changedFiles : { vault_path : string } [ ] ;
988
988
let status : Status | undefined ;
@@ -992,6 +992,12 @@ export default class ObsidianGit extends Plugin {
992
992
this . mayDeleteConflictFile ( ) ;
993
993
status = await this . updateCachedStatus ( ) ;
994
994
995
+ //Should not be necessary, but just in case
996
+ if ( status . conflicted . length == 0 ) {
997
+ this . localStorage . setConflict ( "false" ) ;
998
+ hadConflict = false ;
999
+ }
1000
+
995
1001
// check for conflict files on auto backup
996
1002
if ( fromAutoBackup && status . conflicted . length > 0 ) {
997
1003
this . displayError (
@@ -1078,6 +1084,14 @@ export default class ObsidianGit extends Plugin {
1078
1084
unstagedFiles,
1079
1085
} ) ;
1080
1086
}
1087
+
1088
+ //Handle resolved conflict after commit
1089
+ if ( this . gitManager instanceof SimpleGit ) {
1090
+ if ( ( await this . updateCachedStatus ( ) ) . conflicted . length == 0 ) {
1091
+ this . localStorage . setConflict ( "false" ) ;
1092
+ }
1093
+ }
1094
+
1081
1095
let roughly = false ;
1082
1096
if ( committedFiles === undefined ) {
1083
1097
roughly = true ;
0 commit comments