Re: [PATCH 5/8] push doc: correct lies about how push refspecs work

2018-05-07 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > + > The is often the name of the branch you would want to push, but > -it can be any arbitrary "SHA-1 expression", such as `master~4` or > -`HEAD` (see linkgit:gitrevisions[7]). > +it can be any arbitrary "SHA-1 expression" referring to a

[PATCH 5/8] push doc: correct lies about how push refspecs work

2018-04-29 Thread Ævar Arnfjörð Bjarmason
There's complex rules governing whether a push is allowed to take place depending on whether we're pushing to refs/heads/*, refs/tags/* or refs/not-that/*. See is_branch() in refs.c, and the various assertions in refs/files-backend.c. (e.g. "trying to write non-commit object %s to branch '%s'").