Rev 14 | Rev 16 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14 | Rev 15 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | if (!preg_match('@ref: (.+)[\r\n]@', "$cont\n", $m)) throw new Exception("Cannot find HEAD ref"); |
23 | if (!preg_match('@ref: (.+)[\r\n]@', "$cont\n", $m)) throw new Exception("Cannot find HEAD ref"); |
24 | $commit_object = trim(file_get_contents($git_dir.'/'.$m[1])); |
24 | $commit_object = trim(file_get_contents($git_dir.'/'.$m[1])); |
25 | 25 | ||
26 | $objects_dir = $git_dir . '/objects'; |
26 | $objects_dir = $git_dir . '/objects'; |
27 | 27 | ||
28 | $pack_files = glob($objects_dir.'\pack\pack-*.pack'); |
28 | $pack_files = glob($objects_dir.'/pack/pack-*.pack'); |
- | 29 | $last_exception = 'No pack files found'; |
|
29 | foreach ($pack_files as $basename) { |
30 | foreach ($pack_files as $basename) { |
30 | $basename = substr(basename($basename),0,strlen(basename($basename))-5); |
31 | $basename = substr(basename($basename),0,strlen(basename($basename))-5); |
31 | try { |
32 | try { |
32 | return git_read_object($commit_object, |
33 | return git_read_object($commit_object, |
33 | $objects_dir.'/pack/'.$basename.'.idx', |
34 | $objects_dir.'/pack/'.$basename.'.idx', |