git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on GIT tutorial.
@ 2005-11-14 10:20 Franck
  2005-11-17 19:47 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Franck @ 2005-11-14 10:20 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I have a question about the GIT tutorial. At page 21, there is a
description of "subsystem maintainer" work cycle, I don't understand
why point 3 is needed. This point tells:

"""
Copy over the packed files from "project lead" public repository to
your public repository.
"""

Why is it needed ?

Thanks
--
               Franck

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on GIT tutorial.
  2005-11-14 10:20 Question on GIT tutorial Franck
@ 2005-11-17 19:47 ` Junio C Hamano
  2005-11-18  7:24   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2005-11-17 19:47 UTC (permalink / raw)
  To: Franck; +Cc: git

Franck <vagabon.xyz@gmail.com> writes:

> Hi,
>
> I have a question about the GIT tutorial. At page 21, there is a
> description of "subsystem maintainer" work cycle, I don't understand
> why point 3 is needed. This point tells:
>
> """
> Copy over the packed files from "project lead" public repository to
> your public repository.
> """
>
> Why is it needed ?

That was a remnant from the days some transports did not
understand objects/info/alternates; I think we do not need that
step anymore.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on GIT tutorial.
  2005-11-17 19:47 ` Junio C Hamano
@ 2005-11-18  7:24   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2005-11-18  7:24 UTC (permalink / raw)
  To: Franck; +Cc: git

Junio C Hamano <junkio@cox.net> writes:

>> """
>> Copy over the packed files from "project lead" public repository to
>> your public repository.
>> """
>>
>> Why is it needed ?
>
> That was a remnant from the days some transports did not
> understand objects/info/alternates; I think we do not need that
> step anymore.

After re-reading that section, I take it back.  What I meant to
say there was this:

   You are the subsystem maintainer, so your tree would have
   many overlapping objects with your project lead.  So in step
   2, you prepare an empty repository first, and then in step
   3., copy the packs from the project lead.  Then pushing into
   that repository in step 4 would prevent the objects you
   inherited from your project lead from getting expanded in
   your public repository.

But these days, there is a more efficient way *if* your public
repository resides on the same machine as the public repository
of your project lead.  First, on the public repository side:

   pub$ export GIT_DIR=/pub/my.git
   pub$ HIS_GIT=/pub/his.git
   pub$ git-init-db
   pub$ echo "$HIS_GIT/objects" >"$GIT_DIR/objects/info/alternates"
   pub$ (cd "$HIS_GIT/refs" && tar - heads tags) |
        (cd "$GIT_DIR/refs" && mkdir j.u.n.k && cd j.u.n.k && tar xf -)

This makes your repository to have the same refs as your
project lead has but under funny names.  Then from your primary
development repository, you push into your public repository:

   home$ git-send-pack --all ssh://pub.repo.xz/pub/my.git/

Thanks to the funny refs you stole from your project lead when
you prepared your public repository, this transfer sends only
objects the project lead does not have, and your refs.  After
this is done, you can get rid of the funny refs you stole from
your project lead:

   pub$ cd "$GIT_DIR/refs" && rm -fr j.u.n.k

If your public repository is not on the same machine as your
project lead's, objects/info/alternates trick cannot be used, so
what we have in the tutorial section still applies.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-18  7:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 10:20 Question on GIT tutorial Franck
2005-11-17 19:47 ` Junio C Hamano
2005-11-18  7:24   ` Junio C Hamano

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).