Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
874f7bc
feat: continue and skip rebase
craigharman Jun 19, 2026
f55ca09
fix: git tests for rebasing
craigharman Jun 19, 2026
7e07df3
feat: liquid glass interface
craigharman Jun 19, 2026
8f7c2c9
feat: add copy to clipboard button to error banner
craigharman Jun 19, 2026
3852ef3
Merge branch 'main' into develop
craigharman Jun 19, 2026
eac879e
feat:automatic software updates using Sparkle
craigharman Jun 19, 2026
9074f29
Gate the step on secrets.SPARKLE_PRIVATE_KEY
craigharman Jun 19, 2026
13f17fe
Ensure we are committing on the latest main branch
craigharman Jun 19, 2026
7487310
Disable update option if sparkle unavailable
craigharman Jun 19, 2026
354016d
Fail loudly on build failure
craigharman Jun 19, 2026
cd5dde1
Potential fix for pull request finding
craigharman Jun 19, 2026
d49ba06
fix: prevent appcast.xml commit from retriggering Release workflow
Copilot Jun 19, 2026
0c9ce1c
Strip any new lines from secret
craigharman Jun 19, 2026
3293625
Warn if sparkle not set
craigharman Jun 19, 2026
a6a5c24
Add guard when version already exists
craigharman Jun 19, 2026
ff59aa8
Fix versioning issues with sparkle
craigharman Jun 19, 2026
ee5d2b7
Potential fix for pull request finding
craigharman Jun 19, 2026
730c686
Potential fix for pull request finding
craigharman Jun 19, 2026
7b23eeb
Potential fix for pull request finding
craigharman Jun 19, 2026
7e96235
Skip appcast.xml when no changes
craigharman Jun 19, 2026
b904ab8
Update agents and claude files
craigharman Jun 19, 2026
4f1a868
fix: sign_update matched the wrong binary
craigharman Jun 19, 2026
895e093
Merge develop changes
craigharman Jun 19, 2026
a9338d0
Merge branch 'main' into develop
craigharman Jun 19, 2026
626e3f8
feat: allow push/pull indicators in sidebar to actually do the push/p…
craigharman Jun 19, 2026
7a1a0a6
fix: when pushing a remote branch include the remote name as well as …
craigharman Jun 19, 2026
70df5fd
Do not fallback to origin show error instead
craigharman Jun 19, 2026
ff5ed2c
fix: make the sparkle search less specific
craigharman Jun 19, 2026
0f530b7
Merge branch 'main' into develop
craigharman Jun 20, 2026
b3e181d
Fix release.yml
craigharman Jun 20, 2026
528f9e7
Merge branch 'main' into develop
craigharman Jun 20, 2026
ff6c4ac
fix: download Sparkle into project from CI
craigharman Jun 20, 2026
6e8b217
fix: access to sparkle key file
craigharman Jun 20, 2026
505d31a
Merge main into develop
craigharman Jun 20, 2026
93cafbd
Merge branch 'main' into develop
craigharman Jun 20, 2026
4028d96
fix: add debugging to deployment
craigharman Jun 20, 2026
fef2820
Merge branch 'main' into develop
craigharman Jun 20, 2026
25103c1
fix: add automerge to release
craigharman Jun 20, 2026
dfb183d
test:Add checks for pull/push numbers
craigharman Jun 21, 2026
6b7a74d
feat:automate deployment workflow
craigharman Jun 22, 2026
1707933
fix: merge conflicts not visible when files are staged
craigharman Jun 23, 2026
563c1d9
Complete merge
craigharman Jun 23, 2026
7a88a41
fix: use token for deployment
craigharman Jun 23, 2026
a0addf8
feat: add remote SSH git repository management
craigharman Jun 24, 2026
03f2837
fix: do not allow banner colour to bleed into sidebar
craigharman Jun 24, 2026
133bb9c
chore: updated clipping on main panel
craigharman Jun 24, 2026
0b5e9f3
ci:remove duplicate tests and use the release token to trigger the bu…
craigharman Jun 24, 2026
c3c82c2
Merge from main
craigharman Jun 24, 2026
57de7ef
Merge branch 'main' into develop
craigharman Jun 24, 2026
6359e71
feat: add scan folder feature to allow bulk import of repositories
craigharman Jun 27, 2026
1300bb7
feat: image diff viewer
craigharman Jun 30, 2026
cc46caf
chore: add before/after image comparison options
craigharman Jun 30, 2026
f0e800d
Merge branch 'main' into develop
craigharman Jun 30, 2026
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
6 changes: 6 additions & 0 deletions Sources/GitKit/CLIGitService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ public struct CLIGitService: GitService {
try? String(contentsOf: root.appendingPathComponent(path), encoding: .utf8)
}

public func fileData(at path: String, revision: String) async throws -> Data {
try Self.requireSafe(path, "path")
if !revision.isEmpty { try Self.requireSafe(revision, "revision") }
return try await runner.run(["show", "\(revision):\(path)"])
}

public func resolveFile(path: String, contents: String) async throws {
try Self.requireSafe(path, "path")
try contents.write(to: root.appendingPathComponent(path), atomically: true, encoding: .utf8)
Expand Down
4 changes: 4 additions & 0 deletions Sources/GitKit/GitService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ public protocol GitService: Sendable {
/// The working-tree contents of `path` (including any conflict markers).
func fileContents(path: String) async -> String?

/// Raw file content at `revision` (e.g. `"HEAD"`, a SHA, or `""` for the index).
/// Used for binary file previews such as image diffs.
func fileData(at path: String, revision: String) async throws -> Data

/// Writes `contents` to `path` and stages it (marking a conflict resolved).
func resolveFile(path: String, contents: String) async throws
}
Expand Down
20 changes: 20 additions & 0 deletions Sources/GitKit/Models/Diff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,27 @@ public struct FileDiff: Sendable {
self.header = header
}

/// Whether the file has a recognised image extension.
public var isImage: Bool {
Self.imageExtensions.contains((path as NSString).pathExtension.lowercased())
}

private static let imageExtensions: Set<String> = [
"png", "jpg", "jpeg", "gif", "webp", "tiff", "tif", "bmp", "svg", "ico", "heic", "heif",
]

public static func empty(path: String) -> FileDiff {
FileDiff(path: path, oldPath: nil, isBinary: false, isNew: false, isDeleted: false, hunks: [])
}
}

/// The old and new image data for a binary image diff.
public struct ImageDiffData: Sendable {
public let oldImage: Data?
public let newImage: Data?

public init(oldImage: Data?, newImage: Data?) {
self.oldImage = oldImage
self.newImage = newImage
}
}
38 changes: 37 additions & 1 deletion Sources/Gitify/Model/RepositoryViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ final class RepositoryViewModel {
var selectedPath: String?
private(set) var selectedStaged = false
private(set) var currentDiff: FileDiff?
private(set) var imageDiffData: ImageDiffData?
var commitMessage: String = ""
var amendMode: Bool = false
private(set) var isCommitting = false
Expand Down Expand Up @@ -132,7 +133,28 @@ final class RepositoryViewModel {

private func loadDiff(path: String, staged: Bool) async {
guard let service else { return }
currentDiff = (try? await service.diff(path: path, staged: staged)) ?? .empty(path: path)
let diff = (try? await service.diff(path: path, staged: staged)) ?? .empty(path: path)
currentDiff = diff
if diff.isBinary && diff.isImage {
imageDiffData = await loadImageDiffData(diff: diff, staged: staged)
} else {
imageDiffData = nil
}
}

private func loadImageDiffData(diff: FileDiff, staged: Bool) async -> ImageDiffData {
guard let service else { return ImageDiffData(oldImage: nil, newImage: nil) }
let oldPath = diff.oldPath ?? diff.path
let oldImage: Data? = diff.isNew ? nil : (try? await service.fileData(at: oldPath, revision: "HEAD"))
let newImage: Data?
if diff.isDeleted {
newImage = nil
} else if staged {
newImage = try? await service.fileData(at: diff.path, revision: "")
} else {
newImage = try? Data(contentsOf: service.root.appendingPathComponent(diff.path))
}
return ImageDiffData(oldImage: oldImage, newImage: newImage)
}

/// Stages or unstages a single hunk of the currently-displayed diff. The direction is
Expand Down Expand Up @@ -280,6 +302,7 @@ final class RepositoryViewModel {
} else {
selectedPath = nil
currentDiff = nil
imageDiffData = nil
}
}
// Refresh history so amend/commit changes are reflected.
Expand Down Expand Up @@ -511,6 +534,18 @@ final class RepositoryViewModel {
return try? await service.commitFileDiff(sha: sha, path: path)
}

func commitImageDiffData(sha: String, parentSHA: String?, diff: FileDiff) async -> ImageDiffData? {
guard let service, diff.isBinary, diff.isImage else { return nil }
let oldPath = diff.oldPath ?? diff.path
let oldImage: Data? = if let parentSHA, !diff.isNew {
try? await service.fileData(at: oldPath, revision: parentSHA)
} else {
nil
}
let newImage: Data? = diff.isDeleted ? nil : (try? await service.fileData(at: diff.path, revision: sha))
return ImageDiffData(oldImage: oldImage, newImage: newImage)
}

func merge(branch: String, squash: Bool, noFastForward: Bool, noCommit: Bool, skipHooks: Bool) async {
await runIntegration("Merge") {
try await $0.merge(branch: branch, squash: squash, noFastForward: noFastForward,
Expand Down Expand Up @@ -650,6 +685,7 @@ final class RepositoryViewModel {
} else {
selectedPath = nil
currentDiff = nil
imageDiffData = nil
}
}
}
22 changes: 17 additions & 5 deletions Sources/Gitify/Views/CommitDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct CommitDetailView: View {
VStack(alignment: .leading, spacing: 0) {
metadata
Divider()
ChangesetDiffPane(ref: commit.id, viewModel: viewModel)
ChangesetDiffPane(ref: commit.id, parentSHA: commit.parents.first, viewModel: viewModel)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
Expand Down Expand Up @@ -46,11 +46,13 @@ struct CommitDetailView: View {
/// changed files with +/- counts on top, and the selected file's diff below.
struct ChangesetDiffPane: View {
let ref: String
var parentSHA: String? = nil
let viewModel: RepositoryViewModel

@State private var changes: [FileChange] = []
@State private var selectedFile: String?
@State private var fileDiff: FileDiff?
@State private var imageDiffData: ImageDiffData?
@State private var loading = false

var body: some View {
Expand All @@ -64,14 +66,23 @@ struct ChangesetDiffPane: View {
}
.frame(maxWidth: .infinity, minHeight: 140)

CommitFileDiffPane(fileDiff: fileDiff)
CommitFileDiffPane(fileDiff: fileDiff, imageDiffData: imageDiffData)
.frame(maxWidth: .infinity, minHeight: 120)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.task(id: ref) { await load() }
.onChange(of: selectedFile) { _, path in
guard let path else { fileDiff = nil; return }
Task { fileDiff = await viewModel.commitFileDiff(ref, path: path) }
guard let path else { fileDiff = nil; imageDiffData = nil; return }
Task {
let diff = await viewModel.commitFileDiff(ref, path: path)
fileDiff = diff
if let diff {
imageDiffData = await viewModel.commitImageDiffData(
sha: ref, parentSHA: parentSHA, diff: diff)
} else {
imageDiffData = nil
}
}
}
}

Expand Down Expand Up @@ -122,13 +133,14 @@ struct ChangesetDiffPane: View {
/// Concrete (not an inline if/else) so selecting a changed file doesn't reset the dragged divider.
private struct CommitFileDiffPane: View {
let fileDiff: FileDiff?
var imageDiffData: ImageDiffData? = nil

var body: some View {
// GeometryReader so the pane keeps a constant (greedy) size whether the diff or the
// placeholder is shown — otherwise VSplitView shifts the divider on file selection.
GeometryReader { _ in
if let fileDiff {
DiffView(diff: fileDiff)
DiffView(diff: fileDiff, imageDiffData: imageDiffData)
} else {
ContentUnavailableView("No File Selected", systemImage: "doc.text.magnifyingglass",
description: Text("Select a changed file to view its diff."))
Expand Down
7 changes: 5 additions & 2 deletions Sources/Gitify/Views/DiffView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ private struct LineRef: Hashable { let hunk: Int; let index: Int }
/// `onApplyLines` is provided, individual added/removed lines can be selected and staged.
struct DiffView: View {
let diff: FileDiff
var imageDiffData: ImageDiffData? = nil
var actionLabel: String = "Stage Hunk"
var lineActionLabel: String = "Stage Lines"
var onApplyHunk: ((DiffHunk) -> Void)? = nil
Expand All @@ -21,9 +22,11 @@ struct DiffView: View {
private var language: String { (diff.path as NSString).pathExtension.lowercased() }

var body: some View {
if diff.isBinary {
if diff.isBinary, let imageDiffData {
ImageDiffView(data: imageDiffData, isNew: diff.isNew, isDeleted: diff.isDeleted)
} else if diff.isBinary {
ContentUnavailableView("Binary File", systemImage: "doc.badge.gearshape",
description: Text("Binary content can't be displayed."))
description: Text("Binary content can\u{2019}t be displayed."))
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else if diff.hunks.isEmpty {
ContentUnavailableView("No Changes", systemImage: "doc.plaintext",
Expand Down
Loading
Loading