project.exec(new Closure<ExecSpec>(project, project)
{
@Override
public ExecSpec call()
{
ExecSpec exec = (ExecSpec) getDelegate();
exec.setExecutable("git");
exec.args((Object[]) args);
exec.setStandardOutput(out);
exec.setWorkingDir(workDir);
return exec;
}
});
return out.toString().trim();