lib/utils/git.js
function resolveFileFromGit(giturl) {
    if (_.isString(giturl)) giturl = parseGitUrl(giturl);
    if (!giturl) return Q(null);

    // Clone or get from cache
    return cloneGitRepo(giturl.host, giturl.ref)
    .then(function(repo) {

        // Resolve relative path
        return path.resolve(repo, giturl.filepath);
    });
}
function resolveFileFromGit(giturl) {
    if (_.isString(giturl)) giturl = parseGitUrl(giturl);
    if (!giturl) return Q(null);

    // Clone or get from cache
    return cloneGitRepo(giturl.host, giturl.ref)
    .then(function(repo) {

        // Resolve relative path
        return path.resolve(repo, giturl.filepath);
    });
}
function resolveFileFromGit ( giturl ) { if ( _ . isString ( giturl ) ) giturl = parseGitUrl ( giturl ) ; if ( ! giturl ) return Q ( null ) ; // Clone or get from cache return cloneGitRepo ( giturl . host , giturl . ref ) . then ( function ( repo ) { // Resolve relative path return path . resolve ( repo , giturl . filepath ) ; } ) ; }
Get file from a git repo
Get file from a git repo