git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Gennady Kushnir <genkush@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: publish since current state?
Date: Mon, 17 Nov 2008 12:44:14 +0100	[thread overview]
Message-ID: <4921590E.6000709@op5.se> (raw)
In-Reply-To: <23ae57c00811170252uba2cd22kb99a23134f026fc6@mail.gmail.com>

Gennady Kushnir wrote:
> 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

      reply	other threads:[~2008-11-17 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 20:42 publish since current state? Gennady Kushnir
2008-11-17  7:21 ` Andreas Ericsson
2008-11-17 10:52   ` Gennady Kushnir
2008-11-17 11:44     ` Andreas Ericsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4921590E.6000709@op5.se \
    --to=ae@op5.se \
    --cc=genkush@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).