added hash_base system (base refs gets stored in the _SESSION)
[phpgitweb.git] / htdocs / lib / GitCommand.class.php
index a8ede915817beaafc0e070ddcb8027248bd8ae2a..1e4b07f6b4c29e4001c22e2bc2031804ea7809ee 100644 (file)
@@ -124,7 +124,7 @@ class GitCommand {
        }
        
        public static function get_commit($git_path, $commit_id) {
-               $args = array("rev-list", "--header", "--max-count=1", $commit_id, "--");
+               $args = array("rev-list", "--header", "--max-count=1", ($commit_id ? $commit_id : "--all"), "--");
                $commit_data = self::git_execute($args, $git_path);
                $commit = self::parse_commit($commit_data);
                return $commit;