Skip to content

Commit 5a43ef1

Browse files
committed
Recfactored pull function arguments
1 parent 4c334f4 commit 5a43ef1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CodeEdit/Features/SourceControl/Client/GitClient+Pull.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import Foundation
99

1010
extension GitClient {
1111
/// Pull changes from remote
12-
func pullFromRemote(remote: String? = nil, branch: String? = nil, rebase: Bool? = nil) async throws {
12+
func pullFromRemote(remote: String? = nil, branch: String? = nil, rebase: Bool = false) async throws {
1313
var command = "pull"
1414

1515
if let remote = remote, let branch = branch {
1616
command += " \(remote) \(branch)"
1717
}
1818

19-
if rebase == true {
19+
if rebase {
2020
command += " --rebase"
2121
}
2222

CodeEdit/Features/SourceControl/SourceControlManager+GitClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ extension SourceControlManager {
285285
}
286286

287287
/// Pull changes from remote
288-
func pull(remote: String? = nil, branch: String? = nil, rebase: Bool? = nil) async throws {
288+
func pull(remote: String? = nil, branch: String? = nil, rebase: Bool = false) async throws {
289289
try await gitClient.pullFromRemote(remote: remote, branch: branch, rebase: rebase)
290290

291291
await self.refreshNumberOfUnsyncedCommits()

0 commit comments

Comments
 (0)