sync: push current branch first
authorJoey Hess <joeyh@joeyh.name>
Wed, 4 Jun 2025 16:06:00 +0000 (12:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 4 Jun 2025 16:06:00 +0000 (12:06 -0400)
commit9f4e95634665f00656e540af2042feb6dc626158
tree18c37fff7fd93d4468acddce637601fab311fa18
parent48e7497f839ee8b923c9cad3616c6e08929e4361
sync: push current branch first

sync: Push the current branch first, rather than a synced branch, to better
support git forges (gitlab, gitea, forgejo, etc.) which use push-to-create
with the first pushed branch becoming the default branch.

With considerable complication to filter out warning message about
receive.denyCurrentBranch when pushing to a non-bare repository. Localization
may break it in the future, but it seems like the best way to handle this. See
my comments for the gory details.
CHANGELOG
Command/Sync.hs
doc/todo/Pushing_current_branch_before_synced__42___or_git-annex.mdwn
doc/todo/Pushing_current_branch_before_synced__42___or_git-annex/comment_1_feb218bccfe9d47fd5faac4c702b4c2f._comment
doc/todo/Pushing_current_branch_before_synced__42___or_git-annex/comment_2_922819fd788abf5b8863ab199c6930cb._comment [new file with mode: 0644]
doc/todo/Pushing_current_branch_before_synced__42___or_git-annex/comment_3_db43976d415d329ce98aea6029b5935e._comment [new file with mode: 0644]
doc/todo/Pushing_current_branch_before_synced__42___or_git-annex/comment_4_e5523122165f8bc9cc9bef74a03c9fa9._comment [new file with mode: 0644]