Refactor Git URL related code, fix #336

This commit is contained in:
Mingshen Sun 2019-11-30 15:11:28 -08:00
parent e83a2f941e
commit 258906fdbb
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
8 changed files with 119 additions and 105 deletions

View file

@ -89,8 +89,8 @@ public class PasswordStore {
return (try? fm.allocatedSizeOfDirectoryAtURL(directoryURL: self.storeURL)) ?? 0
}
public var numberOfLocalCommits: Int? {
return (try? getLocalCommits())?.flatMap { $0.count }
public var numberOfLocalCommits: Int {
return (try? getLocalCommits())?.flatMap { $0.count } ?? 0
}
public var lastSyncedTime: Date? {