Fix Forgejo default-branch resolution #660
Labels
No labels
bug
documentation
duplicate
enhancement
fugitive
good first issue
help wanted
invalid
question
v0.1.0
v0.2.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/forge.nvim#660
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?
Problem
Forgejo PR-create paths use
git symbolic-scope, which is not a Git command.Evidence:
lua/forge/backends/forgejo.lua:1019increate_pr_web_url()lua/forge/backends/forgejo.lua:1076indefault_branch_cmd()Because the command is piped through
sed, the shell can produce empty stdout without failing in the way the fallback expects. That can make default-branch lookup empty, abort compose creation, or fall back tomainfor web-create URLs even when the repo default branch is different.Expected
Forgejo default-branch resolution should use a valid Git command and only fall back to the Forgejo API when local remote-head resolution truly fails.
Non-goals
Do not change PR-create UX or backend semantics beyond making default-branch resolution correct.
Context
Found during release-preview readiness audit. Remote Forgejo CI cannot currently be awaited because the Spark runner is down; use local verification for the fix.