mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-01 05:22:40 +08:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user