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

Re: publish since current state?

From
Andreas Ericsson <ae@op5.se>
Date
Nov 17, 2008, 11:44 UTC
Message-ID
<4921590E.6000709@op5.se>
In-Reply-To
<23ae57c00811170252uba2cd22kb99a23134f026fc6@mail.gmail.com>
Gennady Kushnir wrote:
Show 7 quoted lines
> Thank your for your reply.
> But I could not find documentation for grafts... it is only mentioned
> in glossary.
> The only thing I found with google is 1-year-old a mail list post
> http://marc.info/?l=git&m=119636089519572&w=2
> could you point out some direct link to grafts documentation?
> 
>From that link can be gleaned the important stuff, actually.

--8<--8<-- Graft points are configured via the .git/info/grafts file. It has one record per line describing a commit and its fake parents by listing object names separated by a space and terminated by a newline.

<commit sha1> <parent sha1> [<parent sha1>]* --8<--8<--

> And also - what you mean by "copy the object database
> from the old repository into the new one" ?
I mean something like this:
cd old_repo && git repack -a -d && \
  cp .git/objects/pack/* ../new_repo/.git/objects/pack
cd ../new_repo && \
  echo "$first_sha1_of_new_repo $last_sha1_of_old_repo" \
  > .git/info/grafts
and you're done.
> I'm not aware of such operation. What command does it?
> And will not that copied database go online as dangling objects?
> 

No. The grafts file will connect the two histories so they look like one. The public repo where people clone from should not have the grafts-file, and you should run "git repack -a -d" in that repository to prevent dumb commit walkers from getting access to all your ancient history through a mega-pack.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Gennady Kushnir
Message 4 of 4 in “publish since current state?”
  1. Gennady KushnirNov 16, 2008
  2. Andreas EricssonNov 17, 2008
  3. Gennady KushnirNov 17, 2008
  4. Andreas EricssonNov 17, 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.