|
1 | | -var git = require( '../' ).raw, |
2 | | - rimraf = require( '../vendor/rimraf' ); |
| 1 | +var git = require( '../' ).raw |
| 2 | + , path = require( 'path' ) |
| 3 | + , rimraf = require( '../vendor/rimraf' ); |
3 | 4 |
|
4 | 5 | var testRepo = new git.Repo(); |
5 | 6 |
|
@@ -86,18 +87,18 @@ exports.rawContent = function( test ) { |
86 | 87 | testRepo.open( path.resolve( '../.git' ), function() { |
87 | 88 | testOid.mkstr( '59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5' ); |
88 | 89 |
|
89 | | - commit.lookup( repo, oid, function( err ) { |
90 | | - var tree = new git.Tree( repo ), |
| 90 | + testCommit.lookup( testRepo, testOid, function( err ) { |
| 91 | + var tree = new git.Tree( testRepo ), |
91 | 92 | entry = new git.TreeEntry(), |
92 | | - blob = new git.Blob( repo ); |
| 93 | + blob = new git.Blob( testRepo ); |
93 | 94 |
|
94 | | - if( !commit.tree( tree ) && tree.entryCount() > 1 ) { |
| 95 | + if( !testCommit.tree( tree ) && tree.entryCount() > 1 ) { |
95 | 96 | tree.entryByIndex( entry, 1 ); |
96 | | - entry.toObject( repo, blob ); |
| 97 | + entry.toObject( testRepo, blob ); |
97 | 98 |
|
98 | | - console.log( entry.name() + ':' ); |
99 | | - console.log( blob.rawSize() ); |
100 | | - console.dir( blob.rawContent() ); |
| 99 | + //console.log( entry.name() + ':' ); |
| 100 | + //console.log( blob.rawSize() ); |
| 101 | + //console.dir( blob.rawContent() ); |
101 | 102 | } |
102 | 103 | }); |
103 | 104 | }); |
|
0 commit comments