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

Re: Joining historical repository using grafts or replace

From
Christian Couder <christian.couder@gmail.com>
Date
Oct 31, 2014, 08:45 UTC
Message-ID
<CAP8UFD0ZN1Dq3kAs=nQE3fY8RydqUhSDvYksy7J2igTpt9p5WQ@mail.gmail.com>
In-Reply-To
<CA+POfmvXEjDV9Vap6NDX7HvOMjEVG4mVe1uWFSTQy5g_c+vJnw@mail.gmail.com>
Hi Dmitry,
On Thu, Oct 30, 2014 at 6:41 PM, Dmitry Oksenchuk <oksenchuk89@gmail.com> wrote:
Show 10 quoted lines
> 2014-10-30 19:54 GMT+03:00 Christian Couder <christian.couder@gmail.com>:
>>
>> This might be a good idea. Did you already test that the small
>> repository is really faster than the full repository?
>
> Yes, because of such amount of refs, push in "historical" repository
> takes 12 sec, push in "working" repository takes 0.4 sec, push in
> "joined" repository takes 2 sec. Local operations with history like
> log and blame work with the same speed in "joined" repository as in
> "historical" repository.

What does "joined" mean? Does it mean joined using grafts? Or joined using replace refs? Or just the unsplit full repository?

Also what is interesting is if local operations work with the same speed in the small "working" repository as in the unsplit full repository.

Show 11 quoted lines
>>> Are there any disadvantages of using grafts and replace? Will both of
>>> them be supported in future versions of Git?
>>
>> My opinion is that grafts have no advantage compared to replace refs.
>>
>> Once you have created your replace refs, they can be managed like
>> other git refs, so they are easier to distribute.
>>
>> Basically if you want to get the full history on a computer you just need to do:
>>
>> git fetch 'refs/replace/*:refs/replace/*'
By the way the above should be:
git fetch origin 'refs/replace/*:refs/replace/*'
> That's true but you still need to have another remote with full
> history because it has lots of tags and branches that will be cloned
> by initial clone.

Yeah, you might want to have another remote for that reason, but this is true with both grafts and replace refs.

Best, Christian.

Previous: Dmitry OksenchukNext: Dmitry Oksenchuk
Message 6 of 8 in “Joining historical repository using grafts or replace”
  1. Dmitry OksenchukOct 30, 2014
  2. W. Trevor KingOct 30, 2014
  3. Dmitry OksenchukOct 30, 2014
  4. Christian CouderOct 30, 2014
  5. Dmitry OksenchukOct 30, 2014
  6. Christian CouderOct 31, 2014
  7. Dmitry OksenchukOct 31, 2014
  8. Christian CouderNov 1, 2014

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.