コード例 #1
0
 public Edition(Edit edit, RawText a, RawText b) {
   this.beginA = edit.getBeginA();
   this.beginB = edit.getBeginB();
   this.type = typeof(edit.getType());
   this.ca = new ArrayList<String>();
   this.cb = new ArrayList<String>();
   for (int i = beginA; i < edit.getEndA(); ++i) {
     ca.add(a.getString(i) + '\n');
   }
   for (int i = beginB; i < edit.getEndB(); ++i) {
     cb.add(b.getString(i) + '\n');
   }
 }
コード例 #2
0
 @Override
 public boolean include(final RevCommit commit, final Collection<DiffEntry> diffs) {
   int count = 0;
   for (DiffEntry diff : diffs)
     for (Edit edit :
         BlobUtils.diff(repository, diff.getOldId().toObjectId(), diff.getNewId().toObjectId()))
       switch (edit.getType()) {
         case DELETE:
           count += edit.getLengthA();
           break;
         case INSERT:
         case REPLACE:
           count += edit.getLengthB();
           break;
         default:
           break;
       }
   return include(commit, diffs, count) ? true : include(false);
 }