Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-28 Thread Junio C Hamano
Junio C Hamano writes: > To put it another way, I would think both of these two have at most > the same probability that the push wants to go to a local branch: > > git push refs/remotes/foo:foo > git push :foo > > and I would further say that the former is less likely than the >

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-28 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I was going to submit an update to this, as an additional improvement > can anyone think of a reason not to always infer that we'd like a new > branch if the LHS of the refspec starts with refs/remotes/* ? Depends on what purpose the remote you are pushing into

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-26 Thread Ævar Arnfjörð Bjarmason
On Thu, Oct 11 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> On Wed, Oct 10 2018, Jeff King wrote: >> >>> This is much better, and I love the customized behavior based on the >>> object type. >>> >>> I wonder if we could reword the first paragraph to be a little less >>>

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-11 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Wed, Oct 10 2018, Jeff King wrote: > >> This is much better, and I love the customized behavior based on the >> object type. >> >> I wonder if we could reword the first paragraph to be a little less >> confusing, and spell out what we tried already. E.g.,

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Jeff King
On Thu, Oct 11, 2018 at 06:54:15AM +0900, Junio C Hamano wrote: > > I'm not sure about saying "branch or tag" in the first bullet. It's > > friendlier to most users, but less technically correct (if you said > > "notes/foo", I believe we'd match an existing "refs/notes/foo", because > > it's

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Jeff King
On Wed, Oct 10, 2018 at 11:23:25PM +0200, Ævar Arnfjörð Bjarmason wrote: > > I wonder if we could reword the first paragraph to be a little less > > confusing, and spell out what we tried already. E.g., something like: > > > > The destination you provided is not a full refname (i.e., starting >

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Junio C Hamano
Jeff King writes: >> Fix both of those, now the message will look like this instead: >> >> $ ./git-push avar v2.19.0^{commit}:newbranch -n >> error: unable to push to unqualified destination: newbranch >> hint: The destination refspec neither matches an existing >> hint: ref on

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Ævar Arnfjörð Bjarmason
On Wed, Oct 10 2018, Jeff King wrote: > On Wed, Oct 10, 2018 at 10:41:45AM +, Ævar Arnfjörð Bjarmason wrote: > >> Improve the error message added in f8aae12034 ("push: allow >> unqualified dest refspecs to DWIM", 2008-04-23), which before this >> change looks like this: >> >> $ git push

Re: [PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Jeff King
On Wed, Oct 10, 2018 at 10:41:45AM +, Ævar Arnfjörð Bjarmason wrote: > Improve the error message added in f8aae12034 ("push: allow > unqualified dest refspecs to DWIM", 2008-04-23), which before this > change looks like this: > > $ git push avar v2.19.0^{commit}:newbranch -n > error:

[PATCH 2/2] push: add an advice on unqualified push

2018-10-10 Thread Ævar Arnfjörð Bjarmason
Improve the error message added in f8aae12034 ("push: allow unqualified dest refspecs to DWIM", 2008-04-23), which before this change looks like this: $ git push avar v2.19.0^{commit}:newbranch -n error: unable to push to unqualified destination: newbranch The destination refspec