/** * Detect the file system * * @param cygwinUsed * @return FS instance */ public FS detect(Boolean cygwinUsed) { if (SystemReader.getInstance().isWindows()) { if (cygwinUsed == null) cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin()); if (cygwinUsed.booleanValue()) return new FS_Win32_Cygwin(); else return new FS_Win32(); } else { return new FS_POSIX(); } } }
/** {@inheritDoc} */ @Override public ProcessResult runHookIfPresent(Repository repository, String hookName, String[] args, PrintStream outRedirect, PrintStream errRedirect, String stdinArgs) throws JGitInternalException { return internalRunHookIfPresent(repository, hookName, args, outRedirect, errRedirect, stdinArgs); }
/** {@inheritDoc} */ @Override public File resolve(File dir, String pn) { String useCygPath = System.getProperty("jgit.usecygpath"); //$NON-NLS-1$ if (useCygPath != null && useCygPath.equals("true")) { //$NON-NLS-1$ String w; try { w = readPipe(dir, // new String[] { cygpath, "--windows", "--absolute", pn }, // //$NON-NLS-1$ //$NON-NLS-2$ UTF_8.name()); } catch (CommandFailedException e) { LOG.warn(e.getMessage()); return null; } if (!StringUtils.isEmptyOrNull(w)) { return new File(w); } } return super.resolve(dir, pn); }
@Override public FS detect(Boolean cygwinUsed) { if (SystemReader.getInstance().isWindows()) { if (cygwinUsed == null) cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin()); if (cygwinUsed.booleanValue()) return new FS_Win32_Java7Cygwin(); else return new FS_Win32_Java7(); } else return new FS_POSIX_Java7(); } }
/** {@inheritDoc} */ @Override public FS newInstance() { return new FS_Win32_Cygwin(this); }
/** {@inheritDoc} */ @Override protected File userHomeImpl() { final String home = AccessController .doPrivileged(new PrivilegedAction<String>() { @Override public String run() { return System.getenv("HOME"); //$NON-NLS-1$ } }); if (home == null || home.length() == 0) return super.userHomeImpl(); return resolve(new File("."), home); //$NON-NLS-1$ }
@Override public FS detect(Boolean cygwinUsed) { if (SystemReader.getInstance().isWindows()) { if (cygwinUsed == null) cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin()); if (cygwinUsed.booleanValue()) return new FS_Win32_Java7Cygwin(); else return new FS_Win32_Java7(); } else return new FS_POSIX_Java7(); } }
/** {@inheritDoc} */ @Override public FS newInstance() { return new FS_Win32_Cygwin(this); }
@Override protected File userHomeImpl() { final String home = AccessController .doPrivileged(new PrivilegedAction<String>() { public String run() { return System.getenv("HOME"); //$NON-NLS-1$ } }); if (home == null || home.length() == 0) return super.userHomeImpl(); return resolve(new File("."), home); //$NON-NLS-1$ }
/** * Detect the file system * * @param cygwinUsed * @return FS instance */ public FS detect(Boolean cygwinUsed) { if (SystemReader.getInstance().isWindows()) { if (cygwinUsed == null) cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin()); if (cygwinUsed.booleanValue()) return new FS_Win32_Cygwin(); else return new FS_Win32(); } else { return new FS_POSIX(); } } }
public FS newInstance() { return new FS_Win32_Cygwin(this); }
/** {@inheritDoc} */ @Override public ProcessResult runHookIfPresent(Repository repository, String hookName, String[] args, PrintStream outRedirect, PrintStream errRedirect, String stdinArgs) throws JGitInternalException { return internalRunHookIfPresent(repository, hookName, args, outRedirect, errRedirect, stdinArgs); }
/** {@inheritDoc} */ @Override protected File userHomeImpl() { final String home = AccessController .doPrivileged(new PrivilegedAction<String>() { @Override public String run() { return System.getenv("HOME"); //$NON-NLS-1$ } }); if (home == null || home.length() == 0) return super.userHomeImpl(); return resolve(new File("."), home); //$NON-NLS-1$ }
public File resolve(final File dir, final String pn) { String useCygPath = System.getProperty("jgit.usecygpath"); //$NON-NLS-1$ if (useCygPath != null && useCygPath.equals("true")) { //$NON-NLS-1$ String w; try { w = readPipe(dir, // new String[] { cygpath, "--windows", "--absolute", pn }, // //$NON-NLS-1$ //$NON-NLS-2$ "UTF-8"); //$NON-NLS-1$ } catch (CommandFailedException e) { LOG.warn(e.getMessage()); return null; } if (!StringUtils.isEmptyOrNull(w)) { return new File(w); } } return super.resolve(dir, pn); }
/** * Detect the file system * * @param cygwinUsed * @return FS instance */ public FS detect(Boolean cygwinUsed) { if (SystemReader.getInstance().isWindows()) { if (cygwinUsed == null) cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin()); if (cygwinUsed.booleanValue()) return new FS_Win32_Cygwin(); else return new FS_Win32(); } else { return new FS_POSIX(); } } }
/** * @since 4.0 */ @Override public ProcessResult runHookIfPresent(Repository repository, String hookName, String[] args, PrintStream outRedirect, PrintStream errRedirect, String stdinArgs) throws JGitInternalException { return internalRunHookIfPresent(repository, hookName, args, outRedirect, errRedirect, stdinArgs); }
/** {@inheritDoc} */ @Override public File resolve(File dir, String pn) { String useCygPath = System.getProperty("jgit.usecygpath"); //$NON-NLS-1$ if (useCygPath != null && useCygPath.equals("true")) { //$NON-NLS-1$ String w; try { w = readPipe(dir, // new String[] { cygpath, "--windows", "--absolute", pn }, // //$NON-NLS-1$ //$NON-NLS-2$ UTF_8.name()); } catch (CommandFailedException e) { LOG.warn(e.getMessage()); return null; } if (!StringUtils.isEmptyOrNull(w)) { return new File(w); } } return super.resolve(dir, pn); }