Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread Junio C Hamano
John Keeping writes: > Thanks. I'm about to send v3 anyway to pull a test forward to address > Jakub's comment. I also used oidclr() for the last two changes below. Will replace with v3. I think v3 is ready to advance to 'next'. Let's see if we get further comments from

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread John Keeping
On Tue, Jul 26, 2016 at 12:59:04PM -0700, Junio C Hamano wrote: > John Keeping writes: > > >> > @@ -2294,6 +2294,8 @@ int parse_push_cas_option(struct push_cas_option > >> > *cas, const char *arg, int unse > >> > entry = add_cas_entry(cas, arg, colon - arg); > >> >

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread Junio C Hamano
John Keeping writes: >> > @@ -2294,6 +2294,8 @@ int parse_push_cas_option(struct push_cas_option >> > *cas, const char *arg, int unse >> >entry = add_cas_entry(cas, arg, colon - arg); >> >if (!*colon) >> >entry->use_tracking = 1; >> > + else if

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread John Keeping
On Tue, Jul 26, 2016 at 12:30:05PM +0200, Jakub Narębski wrote: > W dniu 2016-07-25 o 23:59, John Keeping pisze: > > > +test_expect_success 'new branch covered by force-with-lease (explicit)' ' > > + setup_srcdst_basic && > > + ( > > + cd dst && > > + git branch branch

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread Jakub Narębski
W dniu 2016-07-25 o 23:59, John Keeping pisze: > +test_expect_success 'new branch covered by force-with-lease (explicit)' ' > + setup_srcdst_basic && > + ( > + cd dst && > + git branch branch master && > + git push --force-with-lease=branch: origin

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-26 Thread John Keeping
On Mon, Jul 25, 2016 at 03:22:48PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > Allow the empty string to stand in for the null SHA-1 when pushing a new > > branch, like we do when deleting branches. > > > > This means that the following command ensures that

Re: [PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-25 Thread Junio C Hamano
John Keeping writes: > Allow the empty string to stand in for the null SHA-1 when pushing a new > branch, like we do when deleting branches. > > This means that the following command ensures that `new-branch` is > created on the remote (that is, is must not already exist): >

[PATCH v2 2/3] push: add shorthand for --force-with-lease branch creation

2016-07-25 Thread John Keeping
Allow the empty string to stand in for the null SHA-1 when pushing a new branch, like we do when deleting branches. This means that the following command ensures that `new-branch` is created on the remote (that is, is must not already exist): git push --force-with-lease=new-branch: