threads / discuss / 17241

how to track multiple upstreams in one repository

Subject: how to track multiple upstreams in one repository

## tl;dr

13 messages between Jan 19, 2009 and Jan 21, 2009.

replies: 12people: 7as markdown or json

david@lang.hm· Jan 19, 2009, 02:58 UTC · lore

for linux I want to track both the linus tree and the -stable tree. Ideally I want to be able to do a checkout of tags from either tree from the same directory (along with diffs between items in both trees, etc)

I have found documentation on how to clone from each of them, but I haven't found any simple documentation on how to work with both of them.

David Lang
Bryan Donlan· Jan 19, 2009, 02:14 UTC · re: david@lang.hm · lore

Re: how to track multiple upstreams in one repository

On Sun, Jan 18, 2009 at 06:58:06PM -0800, david@lang.hm wrote:
Show 6 quoted lines
> for linux I want to track both the linus tree and the -stable tree.  
> Ideally I want to be able to do a checkout of tags from either tree from  
> the same directory (along with diffs between items in both trees, etc)
>
> I have found documentation on how to clone from each of them, but I  
> haven't found any simple documentation on how to work with both of them.

After cloning from one: git remote add remotename git://... git fetch remotename

You will now have the other repository fetched into your local repository; tags from both will be replicated to your local tags.

david@lang.hm· Jan 19, 2009, 03:58 UTC · re: Bryan Donlan · lore

Re: how to track multiple upstreams in one repository

On Sun, 18 Jan 2009, Bryan Donlan wrote:
Show 14 quoted lines
> On Sun, Jan 18, 2009 at 06:58:06PM -0800, david@lang.hm wrote:
>> for linux I want to track both the linus tree and the -stable tree.
>> Ideally I want to be able to do a checkout of tags from either tree from
>> the same directory (along with diffs between items in both trees, etc)
>>
>> I have found documentation on how to clone from each of them, but I
>> haven't found any simple documentation on how to work with both of them.
>
> After cloning from one:
> git remote add remotename git://...
> git fetch remotename
>
> You will now have the other repository fetched into your local
> repository; tags from both will be replicated to your local tags.

thanks, given the nature of git I figured it was something really simple, but I just wasn't able to find it.

I've forwarded this to the kernel.org webmaster to update the 'how to follow linux development' page

David Lang
Ciprian Dorin, Craciun· Jan 19, 2009, 07:52 UTC · re: david@lang.hm · lore

Re: how to track multiple upstreams in one repository

On Mon, Jan 19, 2009 at 5:58 AM,  <david@lang.hm> wrote:
Show 25 quoted lines
> On Sun, 18 Jan 2009, Bryan Donlan wrote:
>
>> On Sun, Jan 18, 2009 at 06:58:06PM -0800, david@lang.hm wrote:
>>>
>>> for linux I want to track both the linus tree and the -stable tree.
>>> Ideally I want to be able to do a checkout of tags from either tree from
>>> the same directory (along with diffs between items in both trees, etc)
>>>
>>> I have found documentation on how to clone from each of them, but I
>>> haven't found any simple documentation on how to work with both of them.
>>
>> After cloning from one:
>> git remote add remotename git://...
>> git fetch remotename
>>
>> You will now have the other repository fetched into your local
>> repository; tags from both will be replicated to your local tags.
>
> thanks, given the nature of git I figured it was something really simple,
> but I just wasn't able to find it.
>
> I've forwarded this to the kernel.org webmaster to update the 'how to follow
> linux development' page
>
> David Lang
    I use something even simpler, please see the attached .git/config
file that I use. It also uses remote branches, and rewrites the refs
to something like: stable/v2.6.25/master or torvalds/v2.6/master. Also
in order to fetch them I use git fetch stable/v2.6.25
    Ciprian Craciun.
Greg KH· Jan 20, 2009, 03:34 UTC · re: Ciprian Dorin, Craciun · lore

Re: how to track multiple upstreams in one repository

On Mon, Jan 19, 2009 at 09:52:16AM +0200, Ciprian Dorin, Craciun wrote:
>     I use something even simpler, please see the attached .git/config
> file that I use. It also uses remote branches, and rewrites the refs
> to something like: stable/v2.6.25/master or torvalds/v2.6/master. Also
> in order to fetch them I use git fetch stable/v2.6.25

You all do know that all of the -stable trees are automatically kept in one repo on kernel.org, so you don't have to jump through all of these hoops, right?

confused,
greg k-h
Ciprian Dorin, Craciun· Jan 20, 2009, 07:29 UTC · re: Greg KH · lore

Re: how to track multiple upstreams in one repository

On Tue, Jan 20, 2009 at 5:34 AM, Greg KH <greg@kroah.com> wrote:
Show 13 quoted lines
> On Mon, Jan 19, 2009 at 09:52:16AM +0200, Ciprian Dorin, Craciun wrote:
>>     I use something even simpler, please see the attached .git/config
>> file that I use. It also uses remote branches, and rewrites the refs
>> to something like: stable/v2.6.25/master or torvalds/v2.6/master. Also
>> in order to fetch them I use git fetch stable/v2.6.25
>
> You all do know that all of the -stable trees are automatically kept in
> one repo on kernel.org, so you don't have to jump through all of these
> hoops, right?
>
> confused,
>
> greg k-h
    :) This is something that escaped me... Could you give me the
exact git url for this repository? (on kernel.org I'm not able to find
it, just the current one...)
    Thanks,
    Ciprian Craciun.
Miklos Vajna· Jan 20, 2009, 12:03 UTC · re: Ciprian Dorin, Craciun · lore

Re: how to track multiple upstreams in one repository

On Tue, Jan 20, 2009 at 09:29:13AM +0200, "Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com> wrote:
>     :) This is something that escaped me... Could you give me the
> exact git url for this repository? (on kernel.org I'm not able to find
> it, just the current one...)
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
Have you tried this one?
Ciprian Dorin, Craciun· Jan 21, 2009, 16:02 UTC · re: Miklos Vajna · lore

Re: how to track multiple upstreams in one repository

On Tue, Jan 20, 2009 at 2:03 PM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 8 quoted lines
> On Tue, Jan 20, 2009 at 09:29:13AM +0200, "Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com> wrote:
>>     :) This is something that escaped me... Could you give me the
>> exact git url for this repository? (on kernel.org I'm not able to find
>> it, just the current one...)
>
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
>
> Have you tried this one?
    Ok... I'm ashamed... :) :) This is exactly what (we all) were
looking for... Sorry.
    Just one curiosity: is this older (I mean if it was created) than
when 2.6.18 or 19 was released? Because at that time I've searched for
such a repository, didn't found it and hacked the config as I've said
previously...
    Ciprian Craciun.
Greg KH· Jan 21, 2009, 16:11 UTC · re: Ciprian Dorin, Craciun · lore

Re: how to track multiple upstreams in one repository

On Wed, Jan 21, 2009 at 06:02:51PM +0200, Ciprian Dorin, Craciun wrote:
Show 17 quoted lines
> On Tue, Jan 20, 2009 at 2:03 PM, Miklos Vajna <vmiklos@frugalware.org> wrote:
> > On Tue, Jan 20, 2009 at 09:29:13AM +0200, "Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com> wrote:
> >>     :) This is something that escaped me... Could you give me the
> >> exact git url for this repository? (on kernel.org I'm not able to find
> >> it, just the current one...)
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
> >
> > Have you tried this one?
> 
>     Ok... I'm ashamed... :) :) This is exactly what (we all) were
> looking for... Sorry.
> 
>     Just one curiosity: is this older (I mean if it was created) than
> when 2.6.18 or 19 was released? Because at that time I've searched for
> such a repository, didn't found it and hacked the config as I've said
> previously...
Probably not, but I really don't remember when it was created, sorry.
thanks,
greg k-h
A Large Angry SCM· Jan 19, 2009, 02:18 UTC · re: david@lang.hm · lore

Re: how to track multiple upstreams in one repository

david@lang.hm wrote:
Show 6 quoted lines
> for linux I want to track both the linus tree and the -stable tree. 
> Ideally I want to be able to do a checkout of tags from either tree from 
> the same directory (along with diffs between items in both trees, etc)
> 
> I have found documentation on how to clone from each of them, but I 
> haven't found any simple documentation on how to work with both of them.
Attached are what I use. It's not pretty but it's works for me; YMMV.

export GIT_COMMITTER_NAME="@" export GIT_AUTHOR_NAME="@"

./fred.sh git://git.kernel.org/pub/scm/git/git.git git/git
./fred.sh git://git.kernel.org/pub/scm/gitk/gitk.git gitk/gitk
./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/sparse.git torvalds/sparse
./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git torvalds/linux-2.6

./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.11.y.git stable/linux-2.6.11.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.12.y.git stable/linux-2.6.12.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.13.y.git stable/linux-2.6.13.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.14.y.git stable/linux-2.6.14.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git stable/linux-2.6.15.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git stable/linux-2.6.16.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.17.y.git stable/linux-2.6.17.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.18.y.git stable/linux-2.6.18.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.19.y.git stable/linux-2.6.19.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git stable/linux-2.6.20.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.21.y.git stable/linux-2.6.21.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.22.y.git stable/linux-2.6.22.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.23.y.git stable/linux-2.6.23.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.24.y.git stable/linux-2.6.24.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git stable/linux-2.6.25.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.26.y.git stable/linux-2.6.26.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git stable/linux-2.6.27.y ./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.28.y.git stable/linux-2.6.28.y

./fred.sh git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git tglx/history
Julian Phillips· Jan 19, 2009, 16:29 UTC · re: david@lang.hm · lore

Re: how to track multiple upstreams in one repository

On Sun, 18 Jan 2009, david@lang.hm wrote:
Show 6 quoted lines
> for linux I want to track both the linus tree and the -stable tree. Ideally I 
> want to be able to do a checkout of tags from either tree from the same 
> directory (along with diffs between items in both trees, etc)
>
> I have found documentation on how to clone from each of them, but I haven't 
> found any simple documentation on how to work with both of them.

You could always just use git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git ? It already contains both the linus tree and all the stable trees ...

Show 8 quoted lines
>
> David Lang
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
-- 
Julian

  ---
Flattery is like cologne -- to be smelled, but not swallowed.
 		-- Josh Billings
david@lang.hm· Jan 19, 2009, 21:08 UTC · re: Julian Phillips · lore

Re: how to track multiple upstreams in one repository

On Mon, 19 Jan 2009, Julian Phillips wrote:
Show 12 quoted lines
> On Sun, 18 Jan 2009, david@lang.hm wrote:
>
>> for linux I want to track both the linus tree and the -stable tree. Ideally 
>> I want to be able to do a checkout of tags from either tree from the same 
>> directory (along with diffs between items in both trees, etc)
>> 
>> I have found documentation on how to clone from each of them, but I haven't 
>> found any simple documentation on how to work with both of them.
>
> You could always just use 
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git ? 
> It already contains both the linus tree and all the stable trees ...
I know it contains the releases, but does it contain the -rc trees?
David Lang
Julian Phillips· Jan 19, 2009, 20:45 UTC · re: david@lang.hm · lore

Re: how to track multiple upstreams in one repository

On Mon, 19 Jan 2009, david@lang.hm wrote:
Show 16 quoted lines
> On Mon, 19 Jan 2009, Julian Phillips wrote:
>
>>  On Sun, 18 Jan 2009, david@lang.hm wrote:
>> 
>> >  for linux I want to track both the linus tree and the -stable tree. 
>> >  Ideally I want to be able to do a checkout of tags from either tree from 
>> >  the same directory (along with diffs between items in both trees, etc)
>> > 
>> >  I have found documentation on how to clone from each of them, but I 
>> >  haven't found any simple documentation on how to work with both of them.
>>
>>  You could always just use
>>  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
>>  ? It already contains both the linus tree and all the stable trees ...
>
> I know it contains the releases, but does it contain the -rc trees?

It seems to contain everything from the main Linus tree as far as I can see from the gitweb (haven't actually used it for kernel work).

>
> David Lang
>
>
-- 
Julian

  ---
Stock's Observation:
 	You no sooner get your head above water but what someone pulls
 	your flippers off.

← back to recent threads