lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Feb 1, 2018, at 8:33 PM, Sean Conner <sean@conman.org> wrote:

> It was thus said that the Great Jay Carlson once stated:
>> Why aren't you using Git references?
> 
>  Oh, so you mean something like
> 
> 	syslog = require "3a40a635633cb7a2627850811d8f047430b071fa" -- ??
> 	syslog = require "3a40a635633cb7a2627850811d8f047430b071fa.syslog" -- ??
> 	syslog = require "3a40a63.syslog" -- ??

The second makes the most sense I think, and you can sugar it as much as you want. 

refs = require("my-project-gitrefs")
syslog = refs.syslog

or maybe refs.syslog() if the former is too magic for you.

You do still have to resolve 3a40a635633cb7a2627850811d8f047430b071fa into a tree you can read, but that's not so bad; you can do it in any clone.

If you want to follow a tag, you've designated the owners of some Git repository as your namespace resolver. The Git repository has to live somewhere you can reach, so now you have a URL, even if it's file:///home/nop/my-repository (if you're doing this all offline).

Additional fun can be had with validating GPG signatures on tags.

Jay