1 | debug = require('debug') 'clean-stage'
|
2 | Git = require './git'
|
3 |
|
4 | module.exports = (dir, callback) ->
|
5 | git = Git(dir)
|
6 |
|
7 | git.isClean (isClean) ->
|
8 | debug "isClean: #{isClean}"
|
9 |
|
10 | if !isClean
|
11 | err = new Error "git status at #{git.dir} is not clean"
|
12 |
|
13 | callback(err)
|