mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-02 20:17:54 +08:00
Minor cleanup
This commit is contained in:
@ -99,32 +99,6 @@ class GitJournalRepo with ChangeNotifier {
|
|||||||
|
|
||||||
var repo = await GitRepository.load(repoPath).getOrThrow();
|
var repo = await GitRepository.load(repoPath).getOrThrow();
|
||||||
var remoteConfigured = repo.config.remotes.isNotEmpty;
|
var remoteConfigured = repo.config.remotes.isNotEmpty;
|
||||||
/*
|
|
||||||
if (remoteConfigured) {
|
|
||||||
// Code path for 'branch is null' exception
|
|
||||||
var branchR = await repo.currentBranch();
|
|
||||||
var headR = await repo.head();
|
|
||||||
|
|
||||||
BranchConfig? branchConfig;
|
|
||||||
if (branch != null) {
|
|
||||||
branchConfig = repo.config.branch(branch);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (branchR.isFailure || headR.isFailure || branchConfig == null) {
|
|
||||||
var remoteConfig = repo.config.remotes[0];
|
|
||||||
await cloneRemote(
|
|
||||||
repoPath: repoPath,
|
|
||||||
remoteName: remoteConfig.name,
|
|
||||||
cloneUrl: remoteConfig.url,
|
|
||||||
authorName: settings.gitAuthor,
|
|
||||||
authorEmail: settings.gitAuthorEmail,
|
|
||||||
sshPublicKey: settings.sshPublicKey,
|
|
||||||
sshPrivateKey: settings.sshPrivateKey,
|
|
||||||
sshPassword: settings.sshPassword,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
await Directory(cacheDir).create(recursive: true);
|
await Directory(cacheDir).create(recursive: true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user