Package org.eclipse.jgit.lib.CoreConfig

Examples of org.eclipse.jgit.lib.CoreConfig.SymLinks


      fileMode = on && !off;
    } else {
      fileMode = false;
    }

    SymLinks symLinks = SymLinks.FALSE;
    if (getFS().supportsSymlinks()) {
      File tmp = new File(getDirectory(), "tmplink"); //$NON-NLS-1$
      try {
        getFS().createSymLink(tmp, "target"); //$NON-NLS-1$
        symLinks = null;
        FileUtils.delete(tmp);
      } catch (IOException e) {
        // Normally a java.nio.file.FileSystemException
      }
    }
    if (symLinks != null)
      cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null,
          ConfigConstants.CONFIG_KEY_SYMLINKS, symLinks.name()
              .toLowerCase());
    cfg.setInt(ConfigConstants.CONFIG_CORE_SECTION, null,
        ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0);
    cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
        ConfigConstants.CONFIG_KEY_FILEMODE, fileMode);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.CoreConfig.SymLinks

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.