mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
Remove stupid code
I'm not sure what I was thinking when I wrote this. I guess it's good to know that some users no longer have public or private keys since I fucked up the migration. Fixes APP-P7
This commit is contained in:
@ -80,7 +80,6 @@ class Repository with ChangeNotifier {
|
|||||||
var repoDir = Directory(repoPath);
|
var repoDir = Directory(repoPath);
|
||||||
var repoDirStat = repoDir.statSync();
|
var repoDirStat = repoDir.statSync();
|
||||||
|
|
||||||
List<GitRemoteConfig> remotes;
|
|
||||||
if (repoDirStat.type != FileSystemEntityType.directory) {
|
if (repoDirStat.type != FileSystemEntityType.directory) {
|
||||||
Log.i("Calling GitInit for ${settings.folderName} at: $repoPath");
|
Log.i("Calling GitInit for ${settings.folderName} at: $repoPath");
|
||||||
await GitRepository.init(repoPath);
|
await GitRepository.init(repoPath);
|
||||||
@ -91,19 +90,6 @@ class Repository with ChangeNotifier {
|
|||||||
var repo = await GitRepository.load(repoPath);
|
var repo = await GitRepository.load(repoPath);
|
||||||
var remoteConfigured = repo.config.remotes.isNotEmpty;
|
var remoteConfigured = repo.config.remotes.isNotEmpty;
|
||||||
|
|
||||||
if (remoteConfigured) {
|
|
||||||
if (settings.sshPublicKey == null || settings.sshPublicKey.isEmpty) {
|
|
||||||
var remoteNames = remotes.map((e) => e.name + ' ' + e.url).toList();
|
|
||||||
Log.e("Public Key Empty for $remoteNames");
|
|
||||||
logExceptionWarning(Exception("Public Key Empty"), StackTrace.current);
|
|
||||||
}
|
|
||||||
if (settings.sshPrivateKey == null || settings.sshPrivateKey.isEmpty) {
|
|
||||||
var remoteNames = remotes.map((e) => e.name + ' ' + e.url).toList();
|
|
||||||
Log.e("Private Key Empty for $remoteNames");
|
|
||||||
logExceptionWarning(Exception("Private Key Empty"), StackTrace.current);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Repository._internal(
|
return Repository._internal(
|
||||||
repoPath: repoPath,
|
repoPath: repoPath,
|
||||||
gitBaseDirectory: gitBaseDir,
|
gitBaseDirectory: gitBaseDir,
|
||||||
|
Reference in New Issue
Block a user