Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Don’t git add if no files are specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 3, 2014
1 parent 1fbb65b commit c65f3b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/gistup
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ function confirmFiles(files, callback) {
}

function gitAdd(files, callback) {
if (!files.length) return void callback(null);
child.exec("git add " + files.map(quote).join(" "), function(error, stdout, stderr) {
if (!error && stderr) process.stderr.write(stderr), error = new Error("git add failed.");
if (!error && stdout) process.stdout.write(stdout);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gistup",
"version": "0.0.7",
"version": "0.0.8",
"description": "Initialize a gist from the command-line.",
"keywords": [
"gist",
Expand Down

0 comments on commit c65f3b5

Please sign in to comment.