DESCRIPTION

Fix ContainerTreeIterator to return on-disk size of a folder

A ContainerTreeIterator always returned 0 as length of a directory. This
was inconsistent with JGits FileTreeIterator which asked the filesystem
object about the length. At least on unix filesystems the file-system
size of the directory was returned which was different from 0. On
Windows 0 was returned by java.io.File.
Because of this inconsistency folders containing submodules often have
been marked as dirty by mistake. The index was filled with data coming
from a FileTreeIterator (length!=0) while the ContainerTreeIterator
returned length==0.

This has been fixed by forcing ContainerTreeIterator to ask the
filesystem for the length of a folder.

Bug: 391280
Change-Id: I4b75ee1e875ead1d0d2f772056aca918d37d3ffd


COMMENTS

author: Zachary Orozco
date: 2014-10-07 05:36:28.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-10-07 05:36:34.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/6392/

-------------------------------------
author: Brenden Conley
date: 2014-10-07 05:39:42.000000000

Patch Set 2: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/6392/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-10-07 08:35:20.000000000

Patch Set 2: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/6393/

-------------------------------------
author: Brenden Conley
date: 2014-10-07 08:58:02.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/6393/ : SUCCESS

-------------------------------------
author: Danika Greer
date: 2014-10-08 10:54:27.000000000

Patch Set 2: Code-Review+1

(1 comment)

Just a small thing, otherwise looks good.

Line:98, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/SubmoduleAndContainerTreeIteratorTest.java -> Could you extract creation of the iterator into its own method and use it here and below? That should also take care of this ugly wrapping.

-------------------------------------
author: Zachary Orozco
date: 2014-10-08 14:21:24.000000000

Patch Set 2:

(1 comment)

Line:98, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/SubmoduleAndContainerTreeIteratorTest.java -> I put the creation of the iterator into the setup method and assigned it to a field. Formatting is nicer now.

-------------------------------------
