Re: [PATCH] push: allow pushing new branches with --force-with-lease

2016-07-25 Thread Junio C Hamano
Junio C Hamano writes: > I suspect that the if/else cascade in the loop in apply_cas() can > also be taught that ':' followed by an empty string asks to check > that the target ref does not exist, in order to make it a bit more > useful for folks who do not rely on the "use the last observed > st

Re: [PATCH] push: allow pushing new branches with --force-with-lease

2016-07-25 Thread Junio C Hamano
John Keeping writes: > If there is no upstream information for a branch, it is likely that it > is newly created and can safely be pushed under the normal fast-forward > rules. Relax the --force-with-lease check so that we do not reject > these branches immediately but rather attempt to push the

[PATCH] push: allow pushing new branches with --force-with-lease

2016-07-23 Thread John Keeping
If there is no upstream information for a branch, it is likely that it is newly created and can safely be pushed under the normal fast-forward rules. Relax the --force-with-lease check so that we do not reject these branches immediately but rather attempt to push them as new branches, using the nu