feat(git-fix-author): 馃 resolve start from the current branch - #4
Merged
Merged
Conversation
--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
approved these changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git fix-authorcan resolve its own start from the checked-out branch.--current-branch(andGFA_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, detachedHEAD, or a missing integration ref must fail rather than rewrite from the repository root.Included
--current-branchas a mutually exclusive alternative to--start/GFA_START;origin/HEAD, thenorigin/main/origin/master, then a localmain/masterthat is not the current branch;HEAD,--finishof another branch, an empty unique range, and a missing integration ref;GFA_CURRENT_BRANCH=1for the same mode;Usage
git fix-author --current-branch --non-interactive --yesIdentities still come from
--name/--emailorGFA_*.--yesstays on the command; do not exportGFA_YESat boot.Verification
The new cases cover a feature unique range versus
origin/main, unpushed commits onmain, localmainas the integration line,GFA_CURRENT_BRANCH, and rejections (in-sync default branch,--start/GFA_STARTtogether with current-branch mode, detachedHEAD, missing integration).