void () { if (myProject != null && !myProject.isDefault() && !TrustedProjects.isTrusted(myProject)) { throw new IllegalStateException("Shouldn't be possible to run a Git command in the safe mode"); } if (isStarted()) { throw new IllegalStateException("The process has been already started"); } try { myStartTime = System.currentTimeMillis(); String logDirectoryPath = myProject != null ? GitImplBase.stringifyWorkingDir(myProject.getBasePath(), myCommandLine.getWorkDirectory()) : myCommandLine.getWorkDirectory().getPath(); if (!mySilent) { LOG.info("[" + logDirectoryPath + "] " + printableCommandLine()); } else { LOG.debug("[" + logDirectoryPath + "] " + printableCommandLine()); } if (CALL_TRACE_LOG.isDebugEnabled()) { CALL_TRACE_LOG.debug(new Throwable("[" + logDirectoryPath + "] " + printableCommandLine())); } prepareEnvironment(); myExecutable.patchCommandLine(this, myCommandLine, myExecutableContext); OUTPUT_LOG.debug(String.format("%s %% %s started: %s", getCommand(), this.hashCode(), myCommandLine)); // start process myProcess = startProcess(); startHandlingStreams(); } catch (ProcessCanceledException pce) { throw pce; } catch (Throwable t) { if (!ApplicationManager.getApplication().isUnitTestMode()) { LOG.warn(t); // will surely happen if called during unit test disposal, because the working dir is simply removed then } myListeners.getMulticaster().startFailed(t); } }