We need the last modified time available to us in application level code so we can pull the current WorkingTreeIterator from TreeWalk and then grab the last modified time off it to compare against the index file. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- .../spearce/jgit/treewalk/WorkingTreeIterator.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/treewalk/WorkingTreeIterator.java b/org.spearce.jgit/src/org/spearce/jgit/treewalk/WorkingTreeIterator.java index cb4a089..05d9282 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/treewalk/WorkingTreeIterator.java +++ b/org.spearce.jgit/src/org/spearce/jgit/treewalk/WorkingTreeIterator.java @@ -259,6 +259,25 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { pathLen = pathOffset + nameLen; } + /** + * Get the byte length of this entry. + * + * @return size of this file, in bytes. + */ + public long getEntryLength() { + return current().getLength(); + } + + /** + * Get the last modified time of this entry. + * + * @return last modified time of this file, in milliseconds since the epoch + * (Jan 1, 1970 UTC). + */ + public long getEntryLastModified() { + return current().getLastModified(); + } + private static final Comparator<Entry> ENTRY_CMP = new Comparator<Entry>() { public int compare(final Entry o1, final Entry o2) { final byte[] a = o1.encodedName; -- 1.6.0.rc2.219.g1250ab -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html