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

Re: does anything like cvs export exist in git?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 14, 2008, 21:26 UTC
Message-ID
<20080814212654.GS3782@spearce.org>
In-Reply-To
<977100.98240.qm@web27803.mail.ukl.yahoo.com>
Mark Struberg <struberg@yahoo.de> wrote:
Show 12 quoted lines
> I'm the initial author of the Apache maven-scm-providers-git and
> I need to update our SCM-Matrix.
> 
> This is just for making sure I did not oversee anything.
> 
> I didn't came across anything like 'cvs export' and I do not
> think git really needs this, since it doesn't pollute the working
> directories with lots of waste like CVS and SVN does.
> 
> But I just want to make sure to not build workarounds in our
> scm-provider (checkout + afterwards blasting the GIT_DIR) for things
> that do exist natively in git.
You can use:
  git archive --tar HEAD | (mkdir ../dest;cd ../dest;tar xf -)
Or you can do something even more bizzare like:
  export GIT_INDEX_FILE=/tmp/$$.index;
  export GIT_WORK_TREE=../dest;
  export GIT_DIR=.git;
  git read-tree HEAD &&
  git checkout-index --force --all &&
  rm $GIT_INDEX_FILE
-- 
Shawn.
Previous: Mark StrubergNext: Mark Struberg
Message 4 of 9 in “does anything like cvs export exist in git?”
  1. Mark StrubergAug 14, 2008
  2. Matthieu MoyAug 14, 2008
  3. Mark StrubergAug 14, 2008
  4. Shawn O. PearceAug 14, 2008
  5. Mark StrubergAug 14, 2008
  6. Shawn O. PearceAug 14, 2008
  7. Mark StrubergAug 14, 2008
  8. Petr BaudisAug 14, 2008
  9. Mark StrubergAug 14, 2008

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.