Persistent copy of a [git] repository

Sean Farley sean at macports.org
Tue Nov 3 09:59:53 PST 2015


Mojca Miklavec <mojca at macports.org> writes:

> Reposting the question ... I would be grateful for some feedback (and
> someone who could help me move the code to the core or some PortGroup
> in case that the approach sounds reasonable enough).

Have we looked into wrapping git/hg commands so that we could just keep
the working tree? Something like,

# keep a pristine copy
git clone URL /path/to/distfiles/on/disk

# "extract" the repo
git clone /path/to/distfiles/on/disk /path/to/worksrcpath
git checkout HASH_FROM_PORTFILE

Then, if the portfile changes, we can delete the worksrcpath like normal
and probably just run 'git fetch' to make sure the pristine copy is up
to date.


More information about the macports-dev mailing list