Fix FileTreeIterator.idSubmodule(Entry)

FileTreeIterator was calling by mistake
WorkingTreeIterator.idSubmodule(Entry). Instead it should always compute
idSubmodule on its own.

Change-Id: Id1b988aded06939b1d7edd2671e34bf756896c0e
This commit is contained in:
Christian Halstrick 2015-12-02 09:16:03 +01:00 committed by Matthias Sohn
parent 85d09a9ec7
commit 5b55498b16
2 changed files with 4 additions and 6 deletions

View File

@ -87,7 +87,7 @@ public void setUp() throws Exception {
.call();
submodule_db = (FileRepository) Git.wrap(db).submoduleAdd()
.setPath("submodule")
.setPath("modules/submodule")
.setURI(submoduleStandalone.getDirectory().toURI().toString())
.call();
submoduleStandalone.close();

View File

@ -67,8 +67,8 @@
*/
public class FileTreeIterator extends WorkingTreeIterator {
/**
* the starting directory. This directory should correspond to the root of
* the repository.
* the starting directory of this Iterator. All entries are located directly
* in this directory.
*/
protected final File directory;
@ -238,8 +238,6 @@ public File getEntryFile() {
@Override
protected byte[] idSubmodule(final Entry e) {
if (repository == null)
return idSubmodule(getDirectory(), e);
return super.idSubmodule(e);
return idSubmodule(getDirectory(), e);
}
}