SyncButton: Show number of unpushed changes

Related to #123
This commit is contained in:
Vishesh Handa
2020-05-01 11:05:45 +02:00
parent 1a52fb754d
commit 8636021952
6 changed files with 55 additions and 8 deletions

View File

@ -169,6 +169,14 @@ class GitNoteRepository {
rethrow;
}
}
Future<int> numChanges() async {
try {
var repo = await git.GitRepository.load(gitDirPath);
return repo.numChangesToPush();
} catch (_) {}
return 0;
}
}
const ignoredMessages = [