             git.runner = stdout.toString().replace /[\s\r\n]+$/, ''
             git.runner = 'none' if git.runner is ''
             gitContinue()
-            
+
+# notify the user of any issue prior
+# to continuing the concrete operation            
 gitContinue = ->
     if git.branch is 'none'
         git.branch = 'master'

# cli colors
colors = require 'colors'

readyCallback = null

git = module.exports =
    runner: ''
    branch: ''
    config:
        runner: 'concrete.runner'
        branch: 'concrete.branch'
        
    init: (target, callback) ->
        readyCallback = callback
        path = require 'path'
        if target.toString().charAt(0) isnt '/'
            target = process.cwd()+'/'+target
        process.chdir target
        git.target = path.normalize target+'/.git/'
        git.failure = path.normalize target+'/.git/hooks/build-failed'
        git.success = path.normalize target+'/.git/hooks/build-worked'
        path.exists git.target, (exists)->
            if exists is no
                console.log "'#{target}' is not a valid Git repo".red
                process.exit 1
            getBranch()
            getRunner()
        
    pull: (next)->
        jobs = require './jobs'
        out = "Pulling '#{git.branch}' branch"
        jobs.updateLog jobs.current, out, ->

                        console.log out.grey
                        next()

# get the current working branch
# fallback to master if git.config.branch isn't set
getBranch = ->
    exec 'git config --get ' + git.config.branch, (error, stdout, stderr)=>
        if error?
