@ -615,26 +615,25 @@ public class GC {
while ( treeWalk . next ( ) ) {
while ( treeWalk . next ( ) ) {
ObjectId objectId = treeWalk . getObjectId ( 0 ) ;
ObjectId objectId = treeWalk . getObjectId ( 0 ) ;
switch ( treeWalk . getRawMode ( 0 ) & FileMode . TYPE_MASK ) {
switch ( treeWalk . getRawMode ( 0 ) & FileMode . TYPE_MASK ) {
case FileMode . TYPE_MISSING :
case FileMode . TYPE_MISSING :
case FileMode . TYPE_GITLINK :
case FileMode . TYPE_GITLINK :
continue ;
continue ;
case FileMode . TYPE_TREE :
case FileMode . TYPE_TREE :
case FileMode . TYPE_FILE :
case FileMode . TYPE_FILE :
case FileMode . TYPE_SYMLINK :
case FileMode . TYPE_SYMLINK :
ret . add ( objectId ) ;
ret . add ( objectId ) ;
continue ;
continue ;
default :
default :
throw new IOException ( MessageFormat . format (
throw new IOException ( MessageFormat . format (
JGitText . get ( ) . corruptObjectInvalidMode3 , String
JGitText . get ( ) . corruptObjectInvalidMode3 ,
. format ( "%o" , Integer . valueOf ( treeWalk //$NON-NLS-1$
String . format ( "%o" , //$NON-NLS-1$
. getRawMode ( 0 ) ) ,
Integer . valueOf ( treeWalk . getRawMode ( 0 ) ) ) ,
( objectId = = null ) ? "null" //$NON-NLS-1$
( objectId = = null ) ? "null" : objectId . name ( ) , //$NON-NLS-1$
: objectId . name ( ) , treeWalk
treeWalk . getPathString ( ) , //
. getPathString ( ) , repo
repo . getIndexFile ( ) ) ) ;
. getIndexFile ( ) ) ) ) ;
}
}
}
}
return ret ;
return ret ;
} finally {
} finally {
if ( revWalk ! = null )
if ( revWalk ! = null )
@ -703,7 +702,6 @@ public class GC {
}
}
// write the packindex
// write the packindex
@SuppressWarnings ( "resource" )
FileChannel idxChannel = new FileOutputStream ( tmpIdx ) . getChannel ( ) ;
FileChannel idxChannel = new FileOutputStream ( tmpIdx ) . getChannel ( ) ;
OutputStream idxStream = Channels . newOutputStream ( idxChannel ) ;
OutputStream idxStream = Channels . newOutputStream ( idxChannel ) ;
try {
try {