git question

Stefan (metze) Metzmacher metze at samba.org
Mon Jul 2 07:14:06 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Volker Lendecke schrieb:
> Hi!
> 
> Playing with git: What would be the best way to have two
> trees checked out and compiled at the same time? For 'make
> test' I need samba3 and samba4, sometimes I have
> modifications to samba4.
> 
> Right now I have two local repos. Is there a better way?

I've done this:

git clone -n --bare git://git.samba.org/samba samba.git
du -sh samba.git
70M     .

git clone -n -s --reference ./samba.git/ git://git.samba.org/samba s3
cd s3
cat .git/objects/info/alternates
/home/People/metze/devel/samba/samba.git/objects
du -sh .git/
832K    .git/
git checkout --track -b metze-v3-0 origin/v3-0

git clone -n -s --reference ./samba.git/ git://git.samba.org/samba s4
cd s4
cat .git/objects/info/alternates
/home/People/metze/devel/samba/samba.git/objects
du -sh .git/
832K    .git/
git checkout --track -b metze-v4-0 origin/v4-0

then you should always run "git fetch" within samba.git
before doing a "git pull" within s3 or s4, this makes sure
you'll have the objects only stored under samba.git/objects/

you can also run the git-fetch via a cron job as it doesn't
change any working tree.

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGiKW9m70gjA5TCD8RAmF3AKCB4rynSpW0OoD+7Sckm4uQy8RV0wCfeYuM
NIbxpNbZcgfxrQZkIgXuTTA=
=r8dK
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list