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

Re: Problem with git bundle.

From
Jeff King <peff@peff.net>
Date
Mar 30, 2011, 20:18 UTC
Message-ID
<20110330201819.GB30663@sigill.intra.peff.net>
In-Reply-To
<1301488591248-6222619.post@n2.nabble.com>
On Wed, Mar 30, 2011 at 05:36:31AM -0700, mav007ar wrote:
Show 16 quoted lines
> Hi everyone. I am using git-svn and I want transfer a repository using git
> bundle create ...
> Does anyone has the right steps to perform this task?
> Currently I'm doing the following.
> 
> 1- git bundle create  --all
> 2- git clone 
> 3- cd into repository's directory just created.
> 4- Add [svn-remote "svn"]
>         url = https://svn.swacorp.com/svn/commerce/trunk/commerce-project
>         fetch = :refs/remotes/git-svn
> into the .git/config file.
> 5- git svn fetch svn.
> 
> The problem is when I do the last step, I get ALL revisions with out
> considering the revision included into the bundle.

Clone will only clone what's in refs/heads of the bundle. In your case, you also want the refs/remotes/git-svn branch (which is probably the same as the "master" you bring across in the bundle).

So you could do this in the cloned repo:
  git update-ref refs/remotes/git-svn master
And then your svn fetch should be much faster.

But note that git-svn also keeps some magic cache in .git/svn. If you bring that information across, too, the initial fetch would probably be faster. So I really wonder if what you want instead of bundle is to simply tar up the .git directory of the original repo and copy the whole thing to your destination.

-Peff
Previous: mav007arNext: mav007ar
Message 2 of 3 in “Problem with git bundle.”
  1. mav007arMar 30, 2011
  2. Jeff KingMar 30, 2011
  3. mav007arMar 31, 2011

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.