Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-08 Thread Jeff King
On Fri, Nov 08, 2013 at 03:44:43PM -0800, Junio C Hamano wrote: > > The "^origin" is not a refspec, and finding the refspec in the > > dot-expression would involve parsing it into two components. I think you > > can come up with a workable system by parsing the arguments as revision > > specifiers

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-08 Thread Junio C Hamano
Jeff King writes: > On Wed, Nov 06, 2013 at 01:00:42PM -0800, Junio C Hamano wrote: > >> It follows that the syntax naturally support >> >> git fast-export refs/heads/master:refs/heads/foobar >> >> I would think. >> >> That approach lets you express ref mapping without a new option >> --r

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-06 Thread Felipe Contreras
On Wed, Nov 6, 2013 at 3:00 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> On Thu, Oct 31, 2013 at 12:26 PM, Junio C Hamano wrote: >>> Felipe Contreras writes: >>> +test_expect_success 'use refspec' ' + git fast-export --refspec refs/heads/master:refs/heads/foobar maste

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-06 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> I think that is much nicer for the simple cases, but how do we handle >> more complex rev expressions? One can say: >> >> git fast-export master ^origin >> >> or even: >> >> git fast-export origin..master >> >> The "^origin" is not a refspec, a

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-06 Thread Junio C Hamano
Jeff King writes: > I think that is much nicer for the simple cases, but how do we handle > more complex rev expressions? One can say: > > git fast-export master ^origin > > or even: > > git fast-export origin..master > > The "^origin" is not a refspec, and finding the refspec in the > dot-ex

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-06 Thread Jeff King
On Wed, Nov 06, 2013 at 01:00:42PM -0800, Junio C Hamano wrote: > I didn't think things through, but at the external UI level, I see a > possibility of a nicer way to express the above. > > In our "push" refspec (and export is about pushing what we have), a > colonless refspec A is a short-hand f

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-11-06 Thread Junio C Hamano
Felipe Contreras writes: > On Thu, Oct 31, 2013 at 12:26 PM, Junio C Hamano wrote: >> Felipe Contreras writes: >> >>> +test_expect_success 'use refspec' ' >>> + git fast-export --refspec refs/heads/master:refs/heads/foobar master >>> | \ >>> + grep "^commit " | sort | uniq > ac

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-10-31 Thread Felipe Contreras
On Thu, Oct 31, 2013 at 12:26 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> +test_expect_success 'use refspec' ' >> + git fast-export --refspec refs/heads/master:refs/heads/foobar master | >> \ >> + grep "^commit " | sort | uniq > actual && > > It feels somewhat redun

Re: [PATCH v5 06/10] fast-export: add new --refspec option

2013-10-31 Thread Junio C Hamano
Felipe Contreras writes: > +test_expect_success 'use refspec' ' > + git fast-export --refspec refs/heads/master:refs/heads/foobar master | \ > + grep "^commit " | sort | uniq > actual && It feels somewhat redundant that you have to twice say that you are pushing your "master", on

[PATCH v5 06/10] fast-export: add new --refspec option

2013-10-31 Thread Felipe Contreras
So that we can convert the exported ref names. Signed-off-by: Felipe Contreras --- Documentation/git-fast-export.txt | 4 builtin/fast-export.c | 30 ++ t/t9350-fast-export.sh| 7 +++ 3 files changed, 41 insertions(+) diff --git a/D