Avoid duplicating license many times
[gitphp.git] / include / gitutil.git_tar_tree.php
blob:a/include/gitutil.git_tar_tree.php -> blob:b/include/gitutil.git_tar_tree.php
--- a/include/gitutil.git_tar_tree.php
+++ b/include/gitutil.git_tar_tree.php
@@ -7,15 +7,15 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_tar_tree($proj,$hash,$rname = NULL)
 {
-	global $gitphp_conf;
-	$cmd = "env GIT_DIR=" . $proj . " " . $gitphp_conf['gitbin'] . GIT_TAR_TREE . " " . $hash;
+	$cmd = GIT_TAR_TREE . " " . $hash;
 	if ($rname)
 		$cmd .= " " . $rname;
-	return $cmd;
+	return git_exec($proj, $cmd);
 }
 
 ?>

comments