Skip to content

Commit

Permalink
Cleaned up unecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
austincondiff committed Nov 26, 2024
1 parent b31e07d commit 284df2e
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,6 @@ class IgnorePatternModel: ObservableObject {

@MainActor
func addPattern() {
if patterns.isEmpty {
Task {
await setupGlobalIgnoreFile()
}
}
patterns.append(GlobPattern(value: ""))
}

Expand All @@ -273,10 +268,4 @@ class IgnorePatternModel: ObservableObject {
patterns.removeAll { patternsToRemove.contains($0) }
self.selection.removeAll()
}

func setupGlobalIgnoreFile() async {
guard !FileManager.default.fileExists(atPath: fileURL.path) else { return }
FileManager.default.createFile(atPath: fileURL.path, contents: nil)
await gitConfig.set(key: "core.excludesfile", value: "~/\(fileURL.lastPathComponent)")
}
}

0 comments on commit 284df2e

Please sign in to comment.