Fix setting up an empty repo

Fixes APP-EQ
This commit is contained in:
Vishesh Handa
2020-10-21 15:32:33 +02:00
parent ad787158c7
commit 704329e3d5
5 changed files with 29 additions and 12 deletions

View File

@ -194,6 +194,15 @@ class GitNoteRepository {
assert(branchConfig.name != null);
assert(branchConfig.merge != null);
var remoteRef = await repo.remoteBranch(
branchConfig.remote,
branchConfig.trackingBranch(),
);
if (remoteRef == null) {
Log.i('Remote has no refs');
return;
}
try {
await _gitRepo.merge(
branch: branchConfig.remoteTrackingBranch(),