push synced/master before synced/git-annex
authorJoey Hess <joeyh@joeyh.name>
Mon, 21 Jun 2021 16:32:21 +0000 (12:32 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 21 Jun 2021 16:32:21 +0000 (12:32 -0400)
commit1cc7b2661e5ec60f73f04dbe91940d2602df6246
treed9bd50961d2994cc473e594a045e05a39e9494fb
parentfcd5c6a21c2884e03514f15f2ced4249f00c55fa
push synced/master before synced/git-annex

sync: Partly work around github behavior that first branch to be pushed to
a new repository is assumed to be the head branch, by not pushing
synced/git-annex first.

github expects master (or whatever the name is) to be pushed first, but
git-annex sync can't, because it's got to also support pushes to non-bare
repos where pushing master fails, as explained in the big comment. So
pushing synced/master is not entirely a fix, but at least it makes github
default to a branch with the stuff the user expects in it, not a bunch of
annex log files.

Aside from fixing github to not make this assumption, or improving
the git push protocol to include what the current HEAD is, the only other
approach I can think of is to identify git push's progress messages and
display those when pushing master, while filtering out error messages
about non-fast-forward etc. But git doesn't provide a way to separate out
or identify its progress messages.

Sponsored-by: Luke Shumaker on Patreon
CHANGELOG
Command/Sync.hs
doc/forum/Issues_with_IPFS_special_remote/comment_11_e53b0158471605950896cafac7aac4da._comment [new file with mode: 0644]