On Aug 16, 2014, at 8:04 AM, René J.V. Bertin <rjvber...@gmail.com> wrote:

> I'm whipping up a portfile for kdevplatform-devel and kdevelop-devel, aiming 
> to follow the git repo. KDevplatform has a rather big repo, which is 
> re-fetched each time I modify the portfile. It'd be useful to do a `git clone 
> --depth=1` to avoid downloading the entire commit history for what might be 
> just a single build ... is that possible?

The blunt answer is no.

The nuanced answer is that portfetch does pass "--depth=1" if ${git.branch} is 
empty, but you'd only be fetching the remote's heads, and we strongly 
discourage working from heads. (It precludes reproducible builds.)

If your primary concern is development hassle, one workaround is to manually 
clone the repository somewhere once, then set ${git.url} to its local path 
while you're developing. Not only do you avoid fetching over the network, Git 
will simply hardlink the object database instead of using its usual transport 
mechanisms.

vq
_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to