API for clojure.tools.gitlibs - tools.gitlibs 2.5.198-SNAPSHOT (in development)


Full namespace name: clojure.tools.gitlibs

Overview

An API for retrieving and caching git repos and working trees.

The git url can be either an https url for anonymous checkout or an ssh url
for private access. revs can be either full sha, prefix sha, or tag name.

Public Variables and Functions



cache-dir

function
Usage: (cache-dir)
Return the root gitlibs cache directory. By default ~/.gitlibs or
override by setting the environment variable GITLIBS.

    
    
    Source
  


commit-sha

function
Usage: (commit-sha url rev)
Returns unpeeled full commit sha, given a rev (which may be tag, branch, etc)

    
    
    Source
  


descendant

function
Usage: (descendant url revs)
Returns rev in git url which is a descendant of all other revs,
or nil if no such relationship can be established.

    
    
    Source
  


object-type

function
Usage: (object-type url rev)
Takes a git url and rev, and returns the object type, one of :tag :tree
:commit or :blob, or nil if not known or ambiguous.

    
    
    Source
  


procure

function
Usage: (procure url lib rev)
Procure a working tree at rev for the git url representing the library lib,
returns the directory path. lib is a qualified symbol where the qualifier is a
controlled or conveyed identity, or nil if rev is unknown.

    
    
    Source
  


resolve

function
Usage: (resolve url rev)
Takes a git url and a rev, and returns the full commit sha or nil if can't
resolve. rev may be a partial sha, full sha, or tag name.

    
    
    Source
  


tags

function
Usage: (tags url)
Fetches, then returns coll of tags in git url

    
    
    Source
  

config

Implementation, use at your own risk

Public Variables and Functions



CONFIG

var

    
Config map - deref to access

    
    
    Source
  

impl

Implementation, use at your own risk

Public Variables and Functions



ensure-git-dir

function
Usage: (ensure-git-dir url)
Ensure the bare git dir for the specified url, return the path to the git dir.

    
    
    Source
  


git-try-fetch

function
Usage: (git-try-fetch git-dir)
Try to fetch and return the error code (0=success)

    
    
    Source
  


match-exact

function
Usage: (match-exact dir exact)
In dir, match file in dir with exact, nil if doesn't exist

    
    
    Source
  


match-prefix

function
Usage: (match-prefix dir prefix)
In dir, match file in dir with prefix, nil if not found, exception if more than one.

    
    
    Source
  


tags

function
Usage: (tags git-dir)
Fetch, then return all tags in the git dir.

    
    
    Source
  
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.