Commit 17c29f2cc34026a1af2ec44ea384e15716514a8f
Identity file using hex hash
Charles Lehner committed on 2/8/2016, 4:37:24 AMParent: cfeb530e50e371d1f66077bccf8a22e8e15f6427
Files changed
test/run.js | changed |
test/run.js | ||
---|---|---|
@@ -75,17 +75,19 @@ | ||
75 | 75 | tape('make a commit and push', function (t) { |
76 | 76 | var commitMessage = 'Initial commit' |
77 | 77 | var fileName = 'blah.txt' |
78 | 78 | var fileContents = 'i am a file' |
79 | + var fileHash = new Buffer(20) | |
80 | + fileHash.hexWrite('68bd10497ea68e91fa85024d0a0b2fe54e212914') | |
79 | 81 | |
80 | 82 | var objects = t.items(t.deepEquals, [ |
81 | 83 | [{ |
82 | 84 | type: 'commit', |
83 | 85 | data: 'tree 75c54aa020772a916853987a03bff7079463a861\nauthor ' + userStr + ' 1000000000 -0500\ncommitter ' + userStr + ' 1000000000 -0500\n\n' + commitMessage + '\n' |
84 | 86 | }, 'got the commit'], |
85 | 87 | [{ |
86 | 88 | type: 'tree', |
87 | - data: '100644 ' + fileName + '\u0000h=\u0010I~&\u000e\u0011z\u0005\u0002M\n\u000b/eN!)\u0014' | |
89 | + data: '100644 ' + fileName + '\0' + fileHash.toString('ascii') | |
88 | 90 | }, 'got the tree'], |
89 | 91 | [{ |
90 | 92 | type: 'blob', data: fileContents |
91 | 93 | }, 'got the blob'] |
Built with git-ssb-web