Skip to content

Commit

Permalink
If enableSourceControl or refreshStatusLocally setting is false then …
Browse files Browse the repository at this point in the history
…we disable file events on the .git folder. Enabling git settings by default.
  • Loading branch information
austincondiff committed Oct 29, 2024
1 parent e58ab76 commit 7adc787
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension CEWorkspaceFileManager {
// Can be ignored for now, these I think not related to tree changes
continue
case .rootChanged:
// TODO: Handle workspace root changing.
// TODO: #1880 - Handle workspace root changing.
continue
case .itemCreated, .itemCloned, .itemRemoved, .itemRenamed:
for fileItem in fileItems {
Expand All @@ -48,7 +48,10 @@ extension CEWorkspaceFileManager {
self.notifyObservers(updatedItems: files)
}

self.handleGitEvents(events: events)
if Settings.shared.preferences.sourceControl.general.enableSourceControl &&
Settings.shared.preferences.sourceControl.general.refreshStatusLocally {
self.handleGitEvents(events: events)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ extension SettingsData {
/// Indicates whether or not the source control is active
var enableSourceControl: Bool = true
/// Indicates whether or not we should include the upstream changes
var refreshStatusLocally: Bool = false
var refreshStatusLocally: Bool = true
/// Indicates whether or not we should include the upstream changes
var fetchRefreshServerStatus: Bool = false
var fetchRefreshServerStatus: Bool = true
/// Indicates whether or not we should include the upstream changes
var addRemoveAutomatically: Bool = false
var addRemoveAutomatically: Bool = true
/// Indicates whether or not we should include the upstream changes
var selectFilesToCommit: Bool = false
var selectFilesToCommit: Bool = true
/// Indicates whether or not to show the source control changes
var showSourceControlChanges: Bool = true
/// Indicates whether or not we should include the upstream
var includeUpstreamChanges: Bool = false
var includeUpstreamChanges: Bool = true
/// Indicates whether or not we should open the reported feedback in the browser
var openFeedbackInBrowser: Bool = true
/// The selected value of the comparison view
Expand Down

0 comments on commit 7adc787

Please sign in to comment.