Subject: Re: Multiple working trees with GIT ?

From: "J. Bruce Fields" <[email-masked]>
Date: Thu, 24 Jan 2008 09:51:28 -0500

On Thu, Jan 24, 2008 at 08:49:52AM +0100, Willy Tarreau wrote:
> Hi all,
> 
> I'm having long thoughts about how to use GIT to manage a distro. One of
> the aspects which comes very often is the notion of "variant" for a
> packaging. For instance, the whole project could consist in a list of packages
> with their branches, but this list may vary depending on the platform, the
> medium, etc... I was searching how to propagate common changes withing variants
> with the least hassle.
> 
> I figured out that having one file list per variant will be very annoying. In
> another project, that's already what I have and frankly, applying the same
> change to 10 files is counter-productive. Since the lists will often be the
> sames except for a few entries, and since most updates will be relevant to
> all variants, I thought branches will be my best friends.
> 
> But I would like to be able to always access file lists, without having to
> constantly git-checkout <variant-X>.

Could just read-only access with git-show be enough for your purposes?:

	git show <branch-name>:		# show top-level directory,
	git show <branch-name>:lib/	# show lib/ directory, etc....
	git show <branch-name>:lib/Makefile

--b.