fix: madtea git commit display author comes from the Gitea account, can diverge from the actual local-identity author #447
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#447
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up surfaced while landing #425 (commit identity from the target repo's local config).
internal/cmd/git/commit.gopopulates itsCommitDataJSONauthordisplay field from the Gitea account (commitGetAuthor = GetGiteaAuthor). After #425, the actual commit is authored with the TARGET repo's local git identity. So the displayedauthorcan diverge from who actually authored the commit.Fix: source the displayed author from the same local-identity primitive (
LocalIdentityAt), or read it back from the recorded commit object (HeadIdentity), so the display matches the commit that was actually written.Related
Resolved on main by
0e6f8277(the #425 item-1 commit, which landed after this was filed). That commit replacedcommitGetAuthor = gitlib.GetGiteaAuthorwithcommitRecordedAuthor = func(...) { return gitlib.HeadIdentity("") }in internal/cmd/git/commit.go, and runCommit now reads the displayed author back from the recorded commit OBJECT (line 174), so the CLI'sauthorfield matches the local-identity author git actually wrote, not the Gitea account. The divergence this issue described is gone. Closing.