[csw-maintainers] git repo tracking from gar

Ben Walton bwalton at opencsw.org
Wed Mar 4 20:19:00 CET 2009


Hi All,

I just committed a change to GAR that allows you to track git repos
for your upstream source instead of pulling down tarballs.

To use this feature, you may use some or all of the following:

1. Define GIT_REPOS as a list of urls (git:// or http:// currently,
   but these are the most common) that will be pulled down.
2. Repos are stored as 'bare' (in git parlance, just the metadata, no
   checked out workspace) repository.
3. Each fetch should update the repo from the remote site.
4. Depending on the location where GAR is being used, git:// urls may
   need to be proxied (the BO farm, for example).  This is handled by
   setting GIT_USE_PROXY.  The default proxy script is
   gar/bin/gitproxy, but this is customizable by the user for
   different environments by setting GIT_PROXY_SCRIPT appropriately.
5. By default, the repo will track the 'master' branch from the origin
   site, but the user may set GIT_REFS_$(GITPROJ), where GITPROJ is
   the filename portion of the repo (eg:
   git://git.kernel.org/pub/scm/git/git.git becomes git.git)
6. At extract time, the default commit to checkout from the repo is
   HEAD (last commit), but by setting GIT_TREEISH_$(GITPROJ), you
   can request a specific tag or alternate commit object (most
   projects will tag releases).  For the Git project itself, I use
   GIT_TREEISH_git.git = v$(GARVERSION).
7. The checkout directory is defaulted to the normal $(EXTRACTDIR).
   Override git-extract-%: with a more specific target to change this
   (eg: if you have to upstreams to merge nicely in EXTRACTDIR or
   something).

This feature should allow for efficient storage of an upstream source
and also make for easier 'cherry picking' of patches that may be
committed upstream but not yet released.

Enjoy.
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20090304/bef7d379/attachment.asc>


More information about the maintainers mailing list