Skip to content

Allow detached HEAD as push source - #30

Merged
odrobnik merged 2 commits into
mainfrom
agent/issue-29
Jul 15, 2026
Merged

Allow detached HEAD as push source#30
odrobnik merged 2 commits into
mainfrom
agent/issue-29

Conversation

@odrobnik

Copy link
Copy Markdown
Contributor

Resolves #29.

  • Accept exact HEAD as an unqualified push source so detached commits can be pushed to an explicit destination ref.
  • Preserve normal libgit2 non-fast-forward protection.
  • Add an integration regression test covering the successful detached-HEAD push and a rejected backward update.

Verification:

  • swiftlint lint --strict --quiet
  • swift build --build-tests --scratch-path /Volumes/SSD/SwiftPM/GitKit-issue-29
  • swift test --skip-build --scratch-path /Volumes/SSD/SwiftPM/GitKit-issue-29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f301864f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/GitKit/Repository+Push.swift Outdated
Comment thread Sources/GitKit/Repository+Push.swift Outdated
@odrobnik
odrobnik merged commit 9e2235c into main Jul 15, 2026
6 checks passed
@odrobnik
odrobnik deleted the agent/issue-29 branch July 15, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Push should accept detached HEAD as a source refspec

1 participant