Permalink
Browse files

[test] clean off trailing lines in verifyString

  • Loading branch information...
1 parent a0ca9ce commit 72964d3b10bf01acaf24590dc26ac44e336da8a1 @tmpvar tmpvar committed Nov 9, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 test/fixtures/repo.js
View
@@ -27,9 +27,14 @@ module.exports.getPackFile = function(fn) {
exec('git verify-pack -v .git/objects/pack/pack-*.idx', packRepoOpts, function(e, verifyString) {
var verifyParts = verifyString.split('\n'), verifyObjs = [];
- verifyParts.pop();
- verifyParts.pop();
- verifyParts.pop();
+ var current = verifyParts.length;
+ while(current--) {
+ if (verifyParts[current].match(/^[0-9a-z]{20}/)) {
+ break;
+ }
+ verifyParts.pop();
+ }
+
var verifyHash = {};
verifyParts.forEach(function(line) {

0 comments on commit 72964d3

Please sign in to comment.