From: Alan Knowles Date: Wed, 30 Mar 2011 09:47:21 +0000 (+0800) Subject: gitlive.js X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=62d3630c79687958c34ae3bd81ab391a149d59b3 gitlive.js --- diff --git a/gitlive.js b/gitlive.js index 2294fbd6..09ede617 100644 --- a/gitlive.js +++ b/gitlive.js @@ -145,18 +145,25 @@ var monitor = new Monitor({ switch( cmd.action ) { case 'add': readResult(Git.run(gitlive + '/' + cmd.repo, 'add', cmd.file )); - readResult(Git.run(gitlive + '/' + cmd.repo, 'commit', src.file, { message: src.file} )); + readResult(Git.run(gitlive + '/' + cmd.repo, 'commit', src.file, { message: cmd.file} )); break; case 'rm': readResult(Git.run(gitlive + '/' + cmd.repo, 'rm', cmd.file )); - readResult(Git.run(gitlive + '/' + cmd.repo, 'commit', { all: true, message: src.file} )); + readResult(Git.run(gitlive + '/' + cmd.repo, 'commit', { all: true, message: cmd.file} )); break; - - // [ src.gitpath, 'rm' , src.vpath ], - // [ src.gitpath, 'commit', { all: true, message: src.vpath} ] + case 'update': - + readResult(Git.run(gitlive + '/' + cmd.repo, 'commit', cmd.file , { message: cmd.file} )); + break; + //this.queue.push( + // [ src.gitpath, 'commit' , src.vpath, { message: src.vpath} ] + // ); + this.action_queue.push({ + action: 'update', + repo : src.repo, + file : src.vpath + }); case 'mv':