git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git fetch --reference?
@ 2006-11-15  0:38 Michael K. Edwards
  2006-11-15  1:02 ` Junio C Hamano
  2006-11-15  1:04 ` Jakub Narebski
  0 siblings, 2 replies; 5+ messages in thread
From: Michael K. Edwards @ 2006-11-15  0:38 UTC (permalink / raw)
  To: git

When setting up a working area for kernel integration for a new
embedded target, I generally do a "git clone --reference" so that the
new area has its own repository (and its own branch structure) but
most of the blobs come from a local reference copy.  But now that I'm
integrating bits from several non-trivially divergent trees (mtd-2.6,
netdev-2.6, linux-2.6.16.y, etc.), it would be nice to avoid
re-downloading blobs for these additional remote branches, which are
also available in the local reference copy.  Is it feasible to
implement "git fetch --reference" for this purpose?  Or is there a
better way to manage this sort of integration effort?

Cheers,

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

* Re: git fetch --reference?
  2006-11-15  0:38 git fetch --reference? Michael K. Edwards
@ 2006-11-15  1:02 ` Junio C Hamano
  2006-11-15  1:17   ` Michael K. Edwards
  2006-11-15  1:04 ` Jakub Narebski
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-11-15  1:02 UTC (permalink / raw)
  To: Michael K. Edwards; +Cc: git

"Michael K. Edwards" <medwards.linux@gmail.com> writes:

> When setting up a working area for kernel integration for a new
> embedded target, I generally do a "git clone --reference" so that the
> new area has its own repository (and its own branch structure) but
> most of the blobs come from a local reference copy.  But now that I'm
> integrating bits from several non-trivially divergent trees (mtd-2.6,
> netdev-2.6, linux-2.6.16.y, etc.), it would be nice to avoid
> re-downloading blobs for these additional remote branches, which are
> also available in the local reference copy.  Is it feasible to
> implement "git fetch --reference" for this purpose?  Or is there a
> better way to manage this sort of integration effort?

I am somewhat doubtful that this is common enough to warrant
adding an extra option to "git fetch", but you could add
alternates to these new reference object stores before
initiating the fetch.

For example, if you have pristine linux-2.6/ and your work was
started by cloning with --reference to it into my-2.6/, you
would have something like this:

	$ cd /usr/src
	$ ls -F
        linux-2.6/ linux-2.6.16.y/ netdev-2.6/ my-2.6/
	$ cd my-2.6/
        $ cat .git/objects/info/alternates
	/usr/src/linux-2.6/.git/objects

Then you would (still in my-2.6 repository):

	$ cat >>.git/objects/info/alternates
        /usr/src/linux-2.6.16.y/.git/objects
        /usr/src/netdev-2.6/.git/objects
        $ git pull ../netdev-2.6/ ALL

which would hopefully not download _any_ objects but just gets
the ALL branch and makes a merge commit in your working
repository.

        

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

* Re: git fetch --reference?
  2006-11-15  0:38 git fetch --reference? Michael K. Edwards
  2006-11-15  1:02 ` Junio C Hamano
@ 2006-11-15  1:04 ` Jakub Narebski
  1 sibling, 0 replies; 5+ messages in thread
From: Jakub Narebski @ 2006-11-15  1:04 UTC (permalink / raw)
  To: git

Michael K. Edwards wrote:

> When setting up a working area for kernel integration for a new
> embedded target, I generally do a "git clone --reference" so that the
> new area has its own repository (and its own branch structure) but
> most of the blobs come from a local reference copy.  But now that I'm
> integrating bits from several non-trivially divergent trees (mtd-2.6,
> netdev-2.6, linux-2.6.16.y, etc.), it would be nice to avoid
> re-downloading blobs for these additional remote branches, which are
> also available in the local reference copy.  Is it feasible to
> implement "git fetch --reference" for this purpose?  Or is there a
> better way to manage this sort of integration effort?

All (I think) that --reference does is to create alternates file.
You can simply add another alternate before fetch.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


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

* Re: git fetch --reference?
  2006-11-15  1:02 ` Junio C Hamano
@ 2006-11-15  1:17   ` Michael K. Edwards
  2006-11-15  1:49     ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Michael K. Edwards @ 2006-11-15  1:17 UTC (permalink / raw)
  To: git

On 11/14/06, Junio C Hamano <junkio@cox.net> wrote:
> I am somewhat doubtful that this is common enough to warrant
> adding an extra option to "git fetch", but you could add
> alternates to these new reference object stores before
> initiating the fetch.
> ...

Thanks, that's what I was looking for.  I can just set up a "tracking"
tree where I don't attempt any merges, include it in the alternates
for each working tree, and "git fetch" in the tracking tree when it's
convenient.  Now, will tags from the tracking tree propagate into the
working trees?

Cheers,

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

* Re: git fetch --reference?
  2006-11-15  1:17   ` Michael K. Edwards
@ 2006-11-15  1:49     ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-11-15  1:49 UTC (permalink / raw)
  To: Michael K. Edwards; +Cc: git

"Michael K. Edwards" <medwards.linux@gmail.com> writes:

> On 11/14/06, Junio C Hamano <junkio@cox.net> wrote:
>> I am somewhat doubtful that this is common enough to warrant
>> adding an extra option to "git fetch", but you could add
>> alternates to these new reference object stores before
>> initiating the fetch.
>> ...
>
> Thanks, that's what I was looking for.  I can just set up a "tracking"
> tree where I don't attempt any merges, include it in the alternates
> for each working tree, and "git fetch" in the tracking tree when it's
> convenient.  Now, will tags from the tracking tree propagate into the
> working trees?

For the working trees, if you "fetch" from the tracking tree
using short-hand, just like you "fetch" from the origin using
short-hand, tags will be followed, I think.


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

end of thread, other threads:[~2006-11-15  1:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-15  0:38 git fetch --reference? Michael K. Edwards
2006-11-15  1:02 ` Junio C Hamano
2006-11-15  1:17   ` Michael K. Edwards
2006-11-15  1:49     ` Junio C Hamano
2006-11-15  1:04 ` Jakub Narebski

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