timeStamps.add(Long.valueOf(dc.getEntry(i).getLastModified()));
}
// iterate again, now produce the result string
for (int i=0; i<dc.getEntryCount(); ++i) {
DirCacheEntry entry = dc.getEntry(i);
sb.append("["+entry.getPathString()+", mode:" + entry.getFileMode());
int stage = entry.getStage();
if (stage != 0)
sb.append(", stage:" + stage);
if (0 != (includedOptions & MOD_TIME)) {
sb.append(", time:t"+
timeStamps.headSet(Long.valueOf(entry.getLastModified())).size());
}
if (0 != (includedOptions & SMUDGE))
if (entry.isSmudged())
sb.append(", smudged");
if (0 != (includedOptions & LENGTH))
sb.append(", length:"
+ Integer.toString(entry.getLength()));
if (0 != (includedOptions & CONTENT_ID))
sb.append(", sha1:" + ObjectId.toString(entry.getObjectId()));
if (0 != (includedOptions & CONTENT)) {
sb.append(", content:"
+ new String(db.open(entry.getObjectId(),
Constants.OBJ_BLOB).getCachedBytes(), "UTF-8"));
}
if (0 != (includedOptions & ASSUME_UNCHANGED))
sb.append(", assume-unchanged:"
+ Boolean.toString(entry.isAssumeValid()));
sb.append("]");
}
return sb.toString();
}