forked from jlord/git-it
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edit readme, change verifies to exec
- Loading branch information
Jessica Lord
committed
Jan 22, 2014
1 parent
72cd0e4
commit 0bfa328
Showing
3 changed files
with
10 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#!/usr/bin/env node | ||
|
||
var spawn = require('child_process').spawn | ||
var concat = require('concat-stream') | ||
|
||
var show = spawn('git', ['show']) | ||
|
||
show.stdout.pipe(concat(onShow)) | ||
var exec = require('child_process').exec | ||
|
||
// check that they've commited changes | ||
|
||
function onShow(output) { | ||
var show = output.toString().trim() | ||
exec('git config user.username', function(err, stdout, stdrr) { | ||
var show = stdout.trim() | ||
|
||
if (show.match("new file mode") && show.match("commit")) | ||
console.log("Changes have been committed!") | ||
console.log("Changes have been committed!") | ||
else console.log("Seems no changes \nhave been committed.") | ||
} | ||
}) |