/**
* index of.. matching gitpath..
*/
- public static int indexOfAdd( Array<GitRepo> repos, string gitpath) {
+ public static int indexOf( Array<GitRepo> repos, string gitpath) {
for(var i =0; i < repos.length; i++) {
if (repos.index(i).gitdir == gitpath) {
return i;
*
* @argument {Array} files the files to add.
*/
- public string add ( Array<GitMonitorQueue> files )
+ public string add ( Array<GitMonitorQueue> files ) throws Error, SpawnError
{
// should really find out if these are untracked files each..
// we run multiple versions to make sure that if one failes, it does not ignore the whole lot..
// not sure if that is how git works.. but just be certian.
- return = "";
+ var ret = "";
for (var i = 0; i < files.length;i++) {
var f = files.index(i).vname;
try {
*
* @argument {Array} files the files to add.
*/
- public string remove ( Array<GitMonitorQueue> files )
+ public string remove ( Array<GitMonitorQueue> files ) throws Error, SpawnError
{
// this may fail if files do not exist..
// should really find out if these are untracked files each..
*
*/
- public string commit ( string message, Array<GitMonitorQueue> files )
+ public string commit ( string message, Array<GitMonitorQueue> files ) throws Error, SpawnError
{
}
*/
- string[] args = { "commit", "-m", };
+ string[] args = { "commit", "-m" };
args += (message.length > 0 ? message : "Changed" );
for (var i = 0; i< files.length ; i++ ) {
args += files.index(i).vname; // full path?
* -- maybe later it will have a few options and do more stuff..
*
*/
- public string pull ()
+ public string pull () throws Error, SpawnError
{
// should probably hand error conditions better...
string[] cmd = { "pull" };
* -- maybe later it will have a few options and do more stuff..
*
*/
- public string push ()
+ public string push () throws Error, SpawnError
{
// should
return this.git({ "push" });
*
*/
- public string git(string[] args_in, ?string[] env) throws Error, SpawnError
+ public string git(string[] args_in ) throws Error, SpawnError
{
// convert arguments.
args += this.gitdir;
args += "--no-pager";
- if (env == null) {
- env = {};
- }
+
+
+
//if (this.gitdir != this.repopath) {
// args += "--work-tree";
print( string.joinv (", ", args));
}
+ string[] env = {};
string home = "HOME=" + Environment.get_home_dir() ;
env += home ;
// do not need to set gitpath..