Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31, 2018 at 6:24 PM Junio C Hamano wrote: > > Ævar Arnfjörð Bjarmason writes: > > > On Thu, Aug 30 2018, Ævar Arnfjörð Bjarmason wrote: > > > > [Notes to self] > > ... > > > > Later below this we say: > > > > Pushing an empty allows you to delete the ref from the > > remote

Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-31 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Thu, Aug 30 2018, Ævar Arnfjörð Bjarmason wrote: > > [Notes to self] > ... > > Later below this we say: > > Pushing an empty allows you to delete the ref from the > remote repository. > > Which, perhaps given the discussion of deletions as updates, s

Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Ævar Arnfjörð Bjarmason wrote: [Notes to self] > diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt > index 55277a9781..0f03d36f1e 100644 > --- a/Documentation/git-push.txt > +++ b/Documentation/git-push.txt > @@ -74,12 +74,41 @@ without any `` on the comm

Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-30 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > +on the remote side. Whether this is allowed depends on where in > +`refs/*` the reference lives as described in detail below. Any > +such update does *not* attempt to merge into . See EXAMPLES > +below for details. > ++ > +The `refs/heads/*` namespace will on

[PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-30 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'"). T