Sync: Retry if the remote has changed

This can happen if someone pushed between our pull and push. In this
case lets just try again.
This commit is contained in:
Vishesh Handa
2020-01-27 19:03:30 +01:00
parent a759ad4a23
commit 06d1124c19

@ -112,6 +112,9 @@ class GitNoteRepository {
try {
await _gitRepo.push();
} on GitException catch (ex) {
if (ex.cause == 'cannot push non-fastforwardable reference') {
return sync();
}
Fimber.d(ex.toString());
rethrow;
}