@ -43,7 +43,6 @@
* /
* /
package org.eclipse.jgit.api ;
package org.eclipse.jgit.api ;
import java.io.File ;
import java.io.IOException ;
import java.io.IOException ;
import java.io.InputStream ;
import java.io.InputStream ;
import java.util.Collection ;
import java.util.Collection ;
@ -59,7 +58,6 @@ import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.dircache.DirCacheIterator ;
import org.eclipse.jgit.dircache.DirCacheIterator ;
import org.eclipse.jgit.lib.Constants ;
import org.eclipse.jgit.lib.Constants ;
import org.eclipse.jgit.lib.FileMode ;
import org.eclipse.jgit.lib.FileMode ;
import org.eclipse.jgit.lib.ObjectId ;
import org.eclipse.jgit.lib.ObjectInserter ;
import org.eclipse.jgit.lib.ObjectInserter ;
import org.eclipse.jgit.lib.Repository ;
import org.eclipse.jgit.lib.Repository ;
import org.eclipse.jgit.treewalk.FileTreeIterator ;
import org.eclipse.jgit.treewalk.FileTreeIterator ;
@ -185,20 +183,10 @@ public class AddCommand extends GitCommand<DirCache> {
} finally {
} finally {
in . close ( ) ;
in . close ( ) ;
}
}
builder . add ( entry ) ;
} else
lastAddedFile = path ;
entry . setObjectId ( f . getEntryObjectId ( ) ) ;
} else {
builder . add ( entry ) ;
Repository subRepo = Git . open (
lastAddedFile = path ;
new File ( repo . getWorkTree ( ) , path ) )
. getRepository ( ) ;
ObjectId subRepoHead = subRepo
. resolve ( Constants . HEAD ) ;
if ( subRepoHead ! = null ) {
entry . setObjectId ( subRepoHead ) ;
builder . add ( entry ) ;
lastAddedFile = path ;
}
}
} else {
} else {
builder . add ( c . getDirCacheEntry ( ) ) ;
builder . add ( c . getDirCacheEntry ( ) ) ;
}
}