Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Git History Date bug #1585

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CodeEdit/Features/CodeEditUI/Views/ToolbarBranchPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ struct ToolbarBranchPicker: View {
if currentBranch != nil {
Image.branch
.font(.title3)
.imageScale(.large)
.foregroundColor(controlActive == .inactive ? inactiveColor : .primary)
.imageScale(.medium)
.foregroundColor(controlActive == .inactive ? inactiveColor : .gray)
} else {
Image(systemName: "folder.fill.badge.gearshape")
.font(.title3)
Expand All @@ -57,9 +57,10 @@ struct ToolbarBranchPicker: View {
}, label: {
Text(currentBranch.name)
.font(.subheadline)
.foregroundColor(controlActive == .inactive ? inactiveColor : .secondary)
.foregroundColor(controlActive == .inactive ? inactiveColor : .gray)
.frame(height: 11)
})
.menuIndicator(isHovering ? .visible : .hidden)
.buttonStyle(.borderless)
.padding(.leading, -3)
}
Expand Down
5 changes: 4 additions & 1 deletion CodeEdit/Features/Git/Client/GitClient+CommitHistory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ extension GitClient {
if let branchName { branchNameString = "--first-parent \(branchName)" }
if let maxCount { maxCountString = "-n \(maxCount)" }
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale.current

// Can't use `Locale.current`, since it'd give a nil date outside the US
dateFormatter.locale = Locale(identifier: Locale.current.identifier)
dateFormatter.dateFormat = "EEE, dd MMM yyyy HH:mm:ss Z"

let output = try await run(
"log --pretty=%h¦%H¦%s¦%aN¦%ae¦%cn¦%ce¦%aD¦ \(maxCountString) \(branchNameString) \(fileLocalPath)"
.trimmingCharacters(in: .whitespacesAndNewlines)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct SourceControlNavigatorView: View {
var body: some View {
if let sourceControlManager = workspace.workspaceFileManager?.sourceControlManager {
VStack(spacing: 0) {
SourcControlNavigatorTabs()
SourceControlNavigatorTabs()
.environmentObject(sourceControlManager)
.task {
do {
Expand All @@ -34,7 +34,7 @@ struct SourceControlNavigatorView: View {
}
}

struct SourcControlNavigatorTabs: View {
struct SourceControlNavigatorTabs: View {
@EnvironmentObject var sourceControlManager: SourceControlManager
@State private var selectedSection: Int = 0

Expand Down
Loading