git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/9] fast-export: add new --refspec option

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Sep 23, 2013, 02:35 UTC
Message-ID
<523fa8de6a048_57ae47e7441437@nysa.mail>
In-Reply-To
<523FA07C.9040909@bbn.com>
Richard Hansen wrote:
Show 24 quoted lines
> On 2013-08-29 11:23, Felipe Contreras wrote:
> > So that we can covert the exported ref names.
> > 
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  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/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
> > index 85f1f30..221506b 100644
> > --- a/Documentation/git-fast-export.txt
> > +++ b/Documentation/git-fast-export.txt
> > @@ -105,6 +105,10 @@ marks the same across runs.
> >  	in the commit (as opposed to just listing the files which are
> >  	different from the commit's first parent).
> >  
> > +--refspec::
> > +	Apply the specified refspec to each ref exported. Multiple of them can
> > +	be specified.
> > +
> 
> Do you mean '--refspec=<refspec>' and/or '--refspec <refspec>'?
I mean --refspec refspec1 --refspec refspec2.
Show 19 quoted lines
> > diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
> > index 34c2d8f..dc6666f 100755
> > --- a/t/t9350-fast-export.sh
> > +++ b/t/t9350-fast-export.sh
> > @@ -504,4 +504,11 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
> >  	test_cmp expected actual
> >  '
> >  
> > +test_expect_success 'use refspec' '
> > +	git fast-export --refspec refs/heads/master:refs/heads/foobar master | \
> > +		grep "^commit " | sort | uniq > actual &&
> > +	echo "commit refs/heads/foobar" > expected &&
> > +	test_cmp expected actual
> > +'
> > +
> >  test_done
> > 
> 
> I think it'd be good to add a test for multiple refspecs.
Maybe. If these patches were to actually be applied.
-- 
Felipe Contreras
Previous: Richard HansenNext: Felipe Contreras
Message 9 of 20 in “transport-helper: updates”
  1. 0/9 transport-helper: updatesFelipe Contreras, Aug 29, 2013
  2. 1/9 transport-helper: add 'force' to 'export' helpersFelipe Contreras, Aug 29, 2013
  3. Richard HansenSep 23, 2013
  4. Felipe ContrerasSep 23, 2013
  5. 2/9 transport-helper: check for 'forced update' messageFelipe Contreras, Aug 29, 2013
  6. 3/9 fast-export: improve argument parsingFelipe Contreras, Aug 29, 2013
  7. 4/9 fast-export: add new --refspec optionFelipe Contreras, Aug 29, 2013
  8. Richard HansenSep 23, 2013
  9. Felipe ContrerasSep 23, 2013
  10. 5/9 transport-helper: add support for old:new refspecFelipe Contreras, Aug 29, 2013
  11. 6/9 fast-import: add support to delete refsFelipe Contreras, Aug 29, 2013
  12. 7/9 fast-export: add support to delete refsFelipe Contreras, Aug 29, 2013
  13. 8/9 transport-helper: add support to delete branchesFelipe Contreras, Aug 29, 2013
  14. Richard HansenSep 23, 2013
  15. Felipe ContrerasSep 23, 2013
  16. 9/9 transport-helper: don't update refs in dry-runFelipe Contreras, Aug 29, 2013
  17. Junio C HamanoAug 29, 2013
  18. Felipe ContrerasAug 29, 2013
  19. Richard HansenSep 23, 2013
  20. Felipe ContrerasSep 23, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.