}
} catch (Error e) {
- print(e.message);
+ print("Error: %s\n",e.message);
break;
}
public string pull () throws Error, SpawnError
{
// should probably hand error conditions better...
- string[] cmd = { "pull" };
+ string[] cmd = { "pull" , "--no-edit", "origin", "HEAD" };
return this.git( cmd );
public string push () throws Error, SpawnError
{
// should
- return this.git({ "push" });
+ return this.git({ "push", "origin", "HEAD" });
}
/**
{
// convert arguments.
-
string[] args = { "git" };
//args += "--git-dir";
//args += this.gitdir;
args += "--no-pager";
-
+
//if (this.gitdir != this.repopath) {
// args += "--work-tree";
// args += this.repopath;
//this.lastCmd = args.join(" ");
//if(this.debug) {
stdout.printf( "CWD=%s\n", this.git_working_dir );
- print( string.joinv (" ", args));
+ print( "cmd: %s\n", string.joinv (" ", args));
//}
string[] env = {};
//}
-
var cfg = new SpawnConfig(this.git_working_dir , args , env);
// may throw error...
var sp = new Spawn(cfg);
+
stdout.printf( "GOT: %s\n" , sp.output);
// parse output for some commands ?