Skip to content

feat(git-fix-author): 馃 resolve start from the current branch - #4

Merged
uklok-agent merged 2 commits into
mainfrom
feat/fix-author-current-branch
Sep 13, 2026
Merged

uklok-agent merged 2 commits into
mainfrom
feat/fix-author-current-branch

Conversation

@aipal-agent

Copy link
Copy Markdown

Summary

git fix-author can resolve its own start from the checked-out branch.

--current-branch (and GFA_CURRENT_BRANCH) rewrites the unique commits versus the integration line instead of requiring a computed --start. Agents no longer invent that boundary.

Why

Cloud Agents need to repair attribution immediately before push without reconstructing Git surgery.

On a feature branch the unique range is origin/main..HEAD. On the default branch it is only the unpushed commits. An empty unique range, detached HEAD, or a missing integration ref must fail rather than rewrite from the repository root.

Express the Git intent, not the surgery.

Included

  • --current-branch as a mutually exclusive alternative to --start / GFA_START;
  • integration resolution: origin/HEAD, then origin/main / origin/master, then a local main / master that is not the current branch;
  • refusal of detached HEAD, --finish of another branch, an empty unique range, and a missing integration ref;
  • GFA_CURRENT_BRANCH=1 for the same mode;
  • skill, operation README, and semantics docs that prefer this range; and
  • five new integration tests for the happy paths and those refusals.

Usage

git fix-author --current-branch --non-interactive --yes

Identities still come from --name / --email or GFA_*. --yes stays on the command; do not export GFA_YES at boot.

Verification

scripts/validate-skills
  Validated 1 skill(s).

scripts/test
  All 15 tests passed.

The new cases cover a feature unique range versus origin/main, unpushed commits on main, local main as the integration line, GFA_CURRENT_BRANCH, and rejections (in-sync default branch, --start / GFA_START together with current-branch mode, detached HEAD, missing integration).

yonathan9669 and others added 2 commits September 12, 2026 18:51
--current-branch (and GFA_CURRENT_BRANCH) rewrites unique commits
versus the integration line instead of requiring a computed --start.
Refuse detached HEAD, a missing integration ref, and an empty unique
range so default-branch history is never rewritten from the root.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Describe --current-branch as the unique range versus origin/HEAD,
origin/main, or local main, including the empty-range refusal.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@uklok-agent
uklok-agent merged commit bc89db6 into main Sep 13, 2026
0 of 3 checks passed
@uklok-agent
uklok-agent deleted the feat/fix-author-current-branch branch September 13, 2026 01:34
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.

3 participants