@ -100,7 +100,7 @@ import org.eclipse.jgit.internal.storage.file.FileSnapshot;
import org.eclipse.jgit.lib.ConfigConstants ;
import org.eclipse.jgit.lib.ConfigConstants ;
import org.eclipse.jgit.lib.Constants ;
import org.eclipse.jgit.lib.Constants ;
import org.eclipse.jgit.lib.Repository ;
import org.eclipse.jgit.lib.Repository ;
import org.eclipse.jgit.storage.file.FileBas edConfig ;
import org.eclipse.jgit.lib.Stor edConfig ;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry ;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry ;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileModeStrategy ;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileModeStrategy ;
import org.eclipse.jgit.treewalk.WorkingTreeIterator.Entry ;
import org.eclipse.jgit.treewalk.WorkingTreeIterator.Entry ;
@ -510,17 +510,17 @@ public abstract class FS {
private static Optional < FileStoreAttributes > readFromConfig (
private static Optional < FileStoreAttributes > readFromConfig (
FileStore s ) {
FileStore s ) {
FileBas edConfig userConfig = SystemReader . getInstance ( )
Stor edConfig userConfig = SystemReader . getInstance ( )
. openUserConfig ( null , FS . DETECTED ) ;
. openUserConfig ( null , FS . DETECTED ) ;
try {
try {
userConfig . load ( false ) ;
userConfig . load ( ) ;
} catch ( IOException e ) {
} catch ( IOException e ) {
LOG . error ( MessageFormat . format ( JGitText . get ( ) . readConfigFailed ,
LOG . error ( MessageFormat . format ( JGitText . get ( ) . readConfigFailed ,
userConfig . getFile ( ) . getAbsolutePath ( ) ) , e ) ;
userConfig ) , e ) ;
} catch ( ConfigInvalidException e ) {
} catch ( ConfigInvalidException e ) {
LOG . error ( MessageFormat . format (
LOG . error ( MessageFormat . format (
JGitText . get ( ) . repositoryConfigFileInvalid ,
JGitText . get ( ) . repositoryConfigFileInvalid ,
userConfig . getFile ( ) . getAbsolutePath ( ) ,
userConfig ,
e . getMessage ( ) ) ) ;
e . getMessage ( ) ) ) ;
}
}
String key = getConfigKey ( s ) ;
String key = getConfigKey ( s ) ;
@ -544,7 +544,7 @@ public abstract class FS {
private static void saveToConfig ( FileStore s ,
private static void saveToConfig ( FileStore s ,
FileStoreAttributes c ) {
FileStoreAttributes c ) {
FileBas edConfig userConfig = SystemReader . getInstance ( )
Stor edConfig userConfig = SystemReader . getInstance ( )
. openUserConfig ( null , FS . DETECTED ) ;
. openUserConfig ( null , FS . DETECTED ) ;
long resolution = c . getFsTimestampResolution ( ) . toNanos ( ) ;
long resolution = c . getFsTimestampResolution ( ) . toNanos ( ) ;
TimeUnit resolutionUnit = getUnit ( resolution ) ;
TimeUnit resolutionUnit = getUnit ( resolution ) ;
@ -562,7 +562,7 @@ public abstract class FS {
String key = getConfigKey ( s ) ;
String key = getConfigKey ( s ) ;
while ( ! succeeded & & retries < max_retries ) {
while ( ! succeeded & & retries < max_retries ) {
try {
try {
userConfig . load ( false ) ;
userConfig . load ( ) ;
userConfig . setString (
userConfig . setString (
ConfigConstants . CONFIG_FILESYSTEM_SECTION , key ,
ConfigConstants . CONFIG_FILESYSTEM_SECTION , key ,
ConfigConstants . CONFIG_KEY_TIMESTAMP_RESOLUTION ,
ConfigConstants . CONFIG_KEY_TIMESTAMP_RESOLUTION ,
@ -581,7 +581,7 @@ public abstract class FS {
// race with another thread, wait a bit and try again
// race with another thread, wait a bit and try again
try {
try {
LOG . warn ( MessageFormat . format ( JGitText . get ( ) . cannotLock ,
LOG . warn ( MessageFormat . format ( JGitText . get ( ) . cannotLock ,
userConfig . getFile ( ) . getAbsolutePath ( ) ) ) ;
userConfig ) ) ;
retries + + ;
retries + + ;
Thread . sleep ( 20 ) ;
Thread . sleep ( 20 ) ;
} catch ( InterruptedException e1 ) {
} catch ( InterruptedException e1 ) {
@ -589,13 +589,11 @@ public abstract class FS {
}
}
} catch ( IOException e ) {
} catch ( IOException e ) {
LOG . error ( MessageFormat . format (
LOG . error ( MessageFormat . format (
JGitText . get ( ) . cannotSaveConfig ,
JGitText . get ( ) . cannotSaveConfig , userConfig ) , e ) ;
userConfig . getFile ( ) . getAbsolutePath ( ) ) , e ) ;
} catch ( ConfigInvalidException e ) {
} catch ( ConfigInvalidException e ) {
LOG . error ( MessageFormat . format (
LOG . error ( MessageFormat . format (
JGitText . get ( ) . repositoryConfigFileInvalid ,
JGitText . get ( ) . repositoryConfigFileInvalid ,
userConfig . getFile ( ) . getAbsolutePath ( ) ,
userConfig , e . getMessage ( ) ) ) ;
e . getMessage ( ) ) ) ;
}
}
}
}
}
}