Commitb5edf4d7Recorded24 Apr 2026Repositorysigil-forgejo
forgejo: default auto_init to #f on create-repo / create-org-repo
Message
Flipping from #t because the auto-init forces a README commit + initial master branch on the new remote, which collides with the common pattern of pushing an already-populated local repo (e.g., a git-filter-repo'd extracted package with its own history + v0.13.1 tag). Auto-init's behavior produces a fast-forward-impossible remote, forcing a force-push to reconcile. Users who actually want the template can add the param to the callers later; by default the new repo is empty and pushable.
Surfaced 2026-04-24 during sigil-crypto + sigil-tls extractions — both required force-push after the fjo-created remote already had content. Papercut t-0883.
Changed
src/forgejo/repos.sgl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)Diff
src/forgejo/repos.sglmodified
@@ -27,22 +27,26 @@
27
(forgejo-api-url base-url "users" owner "repos"))) 28
29
;;; Create a new repository for the authenticated user.+30
;;; auto_init defaults to #f so the returned repo is empty, suitable+31
;;; for pushing an already-populated local repo without a force-push. 32
(define (forgejo-create-repo base-url token name description) 33
(forgejo-post/json token 34
(forgejo-api-url base-url "user" "repos") 35
#{ name: name 36
description: description 37
default_branch: "master"−36
auto_init: #t }))+38
auto_init: #f })) 39
40
;;; Create a new repository under an organization.+41
;;; auto_init defaults to #f so the returned repo is empty, suitable+42
;;; for pushing an already-populated local repo without a force-push. 43
(define (forgejo-create-org-repo base-url token org name description) 44
(forgejo-post/json token 45
(forgejo-api-url base-url "orgs" org "repos") 46
#{ name: name 47
description: description 48
default_branch: "master"−45
auto_init: #t }))+49
auto_init: #f })) 50
51
;;; Rename a repository. 52
(define (forgejo-rename-repo base-url token owner repo new-name)