Portfiles with fetch.type git ... can one add arguments to git?

Lawrence Velázquez larryv at macports.org
Sat Aug 16 11:39:21 PDT 2014


>> On Aug 16, 2014, at 2:21 PM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
>> 
>> On Saturday August 16 2014 13:52:21 Lawrence Velázquez wrote:
>> 
>> 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.)
> 
> What if I want a "daily" port? :)

The problem is that a head can point to one commit on one day and another commit on another day, while ${version} doesn't change. This is why working from heads is not acceptable.

See clang-3.5, gcc410, and rust for some examples of "snapshot" ports. The best thing to do is to write the port so that it's easy to update from one day to the next.

>> 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
> 
> That's an idea. How does one specify the local path, with a file:// construct?

No, just a normal /path/like/this. A file:///path/like/this will work, but Git will revert to using its usual transport — which would still be faster than network fetching, but you'd lose hardlinking. (There are use cases for this, but yours isn't one of them.)

vq
Sent from my iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20140816/26feee51/attachment.html>


More information about the macports-users mailing list