[pacman-dev] [PATCH 4/4] makepkg: git: update existing sources in srcdir without removing them first.

Dave Reisner d at falconindy.com
Mon Dec 9 16:10:43 EST 2013


On Mon, Dec 09, 2013 at 04:00:55PM -0500, Ido Rosen wrote:
> Oh, also:
> 
> On Mon, Dec 9, 2013 at 3:57 PM, Ido Rosen <ido at kernel.org> wrote:
> > If saving yourself the step of having to "git clone" again is your
> > only goal, here are two possible ways to solve that problem:
> >
> > 1) Use the $GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable or
> > .git/objects/info/alternates file mechanism, and use an object store
> > that is detached from the git clone, e.g. in some generic directory
> > (e.g. $startdir/gitobjects), and don't delete that directory.  That
> > way, git will not re-download the objects (actual data) that it
> > already fetched, only update the refs and fill in the missing objects
> > in the object store you specify. See
> > https://www.kernel.org/pub/software/scm/git/docs/gitrepository-layout.html
> > for more info...)
> >
> > 2) Make sure to set the git remote each time when updating, using the
> > appropriate "git remote" command.  This has the downside that you are
> > replicating "git clone" functionality.
> >
> 
> 3) Avoidance strategy: Don't clone/fetch all the objects in the
> repository first place by doing a "shallow clone" by setting the
> --depth in git clone.
> https://www.kernel.org/pub/software/scm/git/docs/git-clone.html
> 

This groundbreaking idea has been proposed and rejected several times
already.

> > Your patches for Mercurial, SVN, etc. have a similar problem...
> 


More information about the pacman-dev mailing list