Utilize default settings values
This commit is contained in:
parent
f9c19b3ca4
commit
c2cd6481fd
6 changed files with 13 additions and 15 deletions
|
|
@ -582,7 +582,7 @@ public class PasswordStore {
|
|||
do {
|
||||
let credentialProvider = try credential.credentialProvider(requestGitPassword: requestGitPassword)
|
||||
let options = [GTRepositoryRemoteOptionsCredentialProvider: credentialProvider]
|
||||
if let branch = try getLocalBranch(withName: SharedDefaults[.gitBranchName]!) {
|
||||
if let branch = try getLocalBranch(withName: SharedDefaults[.gitBranchName]) {
|
||||
let remote = try GTRemote(name: "origin", in: storeRepository)
|
||||
try storeRepository.push(branch, to: remote, withOptions: options, progress: transferProgressBlock)
|
||||
}
|
||||
|
|
@ -805,7 +805,7 @@ public class PasswordStore {
|
|||
throw AppError.RepositoryNotSet
|
||||
}
|
||||
// get the remote branch
|
||||
let remoteBranchName = SharedDefaults[.gitBranchName]!
|
||||
let remoteBranchName = SharedDefaults[.gitBranchName]
|
||||
guard let remoteBranch = try storeRepository.remoteBranches().first(where: { $0.shortName == remoteBranchName }) else {
|
||||
throw AppError.RepositoryRemoteBranchNotFound(remoteBranchName)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue