Skip to content
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
20 changes: 10 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ let package = Package(
"LZMASupport",
"ZstdSupport"]),

// libgit2, packaged for SwiftPM by Cocoanetics/GitKit: a pristine
// libgit2 submodule compiled directly, exposing the curated,
// Windows-safe C module `CGitKit` (the git2.h API). GitKit's version
// tracks libgit2's 1:1 (1.9.4 ⇒ libgit2 v1.9.4). This replaces our
// former odrobnik/libgit2 fork pin; GitKit covers all five CI platforms.
.package(url: "https://github.com/Cocoanetics/GitKit",
from: "1.9.4"),
// libgit2 1.9.x packaged as a SwiftPM C target. We pin to our
// own fork while https://github.com/ibrahimcetin/libgit2/pull/<TBD>
// is open — it adds Windows + Android arms to Package.swift so
// the SwiftPM build covers all five of our CI platforms. Roll
// back to upstream once the PR lands.
.package(url: "https://github.com/odrobnik/libgit2",
branch: "windows-android-platforms"),

// ShellKit owns the virtualised shell-environment surface
// (IO sinks, Environment, Sandbox URL gate, NetworkConfig,
Expand Down Expand Up @@ -936,7 +936,7 @@ let package = Package(
.target(
name: "CLibgit2Shim",
dependencies: [
.product(name: "CGitKit", package: "GitKit"),
.product(name: "libgit2", package: "libgit2"),
],
path: "Sources/CLibgit2Shim",
publicHeadersPath: "include"
Expand All @@ -949,7 +949,7 @@ let package = Package(
"CLibgit2Shim",
"ForgeKit",
.product(name: "ShellKit", package: "ShellKit"),
.product(name: "CGitKit", package: "GitKit"),
.product(name: "libgit2", package: "libgit2"),
// For `git archive` — libarchive's writer is the
// backend so the operation runs in-process and works
// under sandboxed iOS / tvOS / watchOS.
Expand All @@ -964,7 +964,7 @@ let package = Package(
"ForgeKit",
.product(name: "ShellKit", package: "ShellKit"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "CGitKit", package: "GitKit"),
.product(name: "libgit2", package: "libgit2"),
],
path: "Sources/SwiftGit/GitCommand"
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ArgumentParser
import ShellKit
import SwiftGit
import CGitKit
import libgit2

struct StashPush: AsyncParsableCommand {
static let configuration = CommandConfiguration(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/GitCommand/VersionCommand.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ArgumentParser
import ShellKit
import CGitKit
import libgit2

struct VersionCommand: ParsableCommand {
static let configuration = CommandConfiguration(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/CallbacksPayload.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Combined heap-allocated box held by every libgit2 callback during a
/// fetch/clone/push. libgit2's `git_remote_callbacks` has one `payload`
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/Credentials.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// What an auth challenge is asking for. Mirrors libgit2's
/// `GIT_CREDENTIAL_*` flags. The transport may permit several at once
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/CredentialsBridge.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Heap-allocated box holding the Swift `CredentialProvider`. We pass a
/// raw pointer to this box as libgit2's `payload`, then unbox it inside
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Apply.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Where to land an applied patch. Mirrors libgit2's
/// `git_apply_location_t` 1:1.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Archive.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ShellKit
import CGitKit
import libgit2

// Selective imports — the libarchive wrapper module is named `Archive`
// and its own `enum Archive` / `ArchiveFormat` / `ArchiveFilter` would
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Blame.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// One hunk returned by ``GitClient/blame(path:)``. Each line in a
/// blamed file falls into exactly one hunk; `linesInHunk` tells you
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+CatFile.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Compact metadata about a git object — what `cat-file -t/-s/-e` reads.
public struct ObjectMetadata: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Checkout.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// What `git checkout -b` did. Real git distinguishes "switched to a
/// new branch 'X'" (created fresh) from "switched to and reset
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+CherryPick.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Result of a `git cherry-pick`.
public enum CherryPickOutcome: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Config.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Where to read/write a config entry. Mirrors `git config`'s scope flags.
public enum ConfigScope: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Describe.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

extension GitClient {

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Diff.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Output mode for ``GitClient/diff(_:format:paths:contextLines:)``.
public enum DiffFormat: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Grep.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

extension GitClient {

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Init.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ShellKit
import CGitKit
import libgit2

extension GitClient {

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Inspection.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ShellKit
import CGitKit
import libgit2

/// Rich result returned by ``GitClient/commitDetailed(message:author:allowEmpty:)``.
/// The CLI uses this to format `git commit`'s `[branch sha] message` line
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Log.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// One commit returned by ``GitClient/log(query:)``.
public struct LogEntry: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Merge.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// What `git merge`'s fast-forward decision was. Mirrors libgit2's
/// `git_merge_analysis_t` filtered through the user's `--ff` choice.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+MvRm.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2
import ShellKit

extension GitClient {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Rebase.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Result of a rebase invocation.
public enum RebaseOutcome: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Reflog.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// One entry in a ref's reflog. Refs have a per-ref reflog stored in
/// `.git/logs/refs/heads/<branch>` (or `.git/logs/HEAD` for HEAD).
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Reset.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Mode for whole-tree resets. Mirrors libgit2's `git_reset_t` 1:1.
public enum ResetMode: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+RevParse.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

extension GitClient {

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Stash.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// Single entry returned by ``GitClient/stashList()``.
public struct Libgit2StashEntry: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Status.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// One entry in a `git status` report. We preserve both the index-side
/// state (HEAD ↔ index) and the workdir-side state (index ↔ working
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Tag.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ForgeKit
import CGitKit
import libgit2

/// One entry returned by ``GitClient/tagList(pattern:)``. Annotated
/// tags carry a `message` + `tagger`; lightweight tags don't.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient+Tree.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// One entry produced by `lsTree`. Mirrors a single line of `git
/// ls-tree`'s default output: `<mode> <type> <sha>\t<name>`.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/GitClient.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import ForgeKit
import ShellKit
import CGitKit
import libgit2

/// In-process libgit2-backed implementation of
/// ``ForgeKit/GitClient`` (the protocol). The simple name `GitClient`
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/Libgit2.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Process-wide libgit2 init / shutdown bookkeeping.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/Libgit2Error.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import CGitKit
import libgit2

/// Wraps a non-zero return code from a `git_*` C call.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/Libgit2Sandboxing.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import ShellKit
import CLibgit2Shim
import CGitKit
import libgit2

/// Bridges `Shell.current.environment.variables()` to libgit2's process-global option
/// block. Keeps libgit2's own `getenv` calls inside its C internals
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/ProgressReporter.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import ShellKit
import CGitKit
import libgit2

/// Formats and emits `remote: …` / `Receiving objects: …` /
/// `From <url>` / `<oldsha>..<newsha> <ref> -> <tracking>` lines to
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftGit/Lib/SignatureResolver.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import ForgeKit
import ShellKit
import CGitKit
import libgit2

/// Real-git-compatible identity resolution for commit author + committer.
///
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftGitTests/CredentialsTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import Testing
import CGitKit
import libgit2
@testable import SwiftGit

@Suite("Credentials bridge")
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftGitTests/Tier2EnvBridgeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#if os(macOS)
import Foundation
import Testing
import CGitKit
import libgit2
import ShellKit
@testable import SwiftGit

Expand Down
Loading