Executes git commands to check for uncommitted changes.

@return <code>true</code> when there are uncommitted changes,
<code>false</code> otherwise.
@throws CommandLineException
@throws MojoFailureException
541073
private boolean executeGitHasUncommitted() throws MojoFailureException,
            CommandLineException {
        boolean uncommited = false;

        // 1 if there were differences and 0 means no differences

        // git diff --no-ext-diff --ignore-submodules --quiet --exit-code
        final CommandResult diffCommandResult = executeGitCommandExitCode(
                "diff", "--no-ext-diff", "--ignore-submodules", "--quiet",
                "--exit-code");

        String error = null;

        if (diffCommandResult.getExitCode() == SUCCESS_EXIT_CODE) {
            // git diff-index --cached --quiet --ignore-submodules HEAD --
            final CommandResult diffIndexCommandResult = executeGitCommandExitCode(
                    "diff-index", "--cached", "--quiet", "--ignore-submodules",
                    "HEAD", "--");
            if (diffIndexCommandResult.getExitCode() != SUCCESS_EXIT_CODE) {
                error = diffIndexCommandResult.getError();
                uncommited = true;
            }
        } else {
            error = diffCommandResult.getError();
            uncommited = true;
        }

        if (StringUtils.isNotBlank(error)) {
            throw new MojoFailureException(error);
        }

        return uncommited;
    }
263637
@Override
    public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener,
            Throwable error) {
        //listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal());
        //listener.getLogger().println("[MavenDependenciesRecorder] dependencies: " + pom.getArtifacts());
        recordMavenDependencies(pom.getArtifacts());
        return true;
    }
258030
public function commitTransaction()
    {
        if ($this->isTransactionEnabled() === false) {
            throw new ServiceException(sprintf(
                'The repository for %s doesn\'t support Transactions',
                $this->getEntityServiceName()
            ));
        }

        $this->getRepository()->commitTransaction();
    }
1331237
@Override
    public Object execute() throws Exception 
    {
        Object ret = executeChange();
        if (changesManager != null)
            changesManager.modelChanged();
        return ret;
    }
251596
public static boolean isUncommitted(Transaction tx)
   {
      if (tx == null)
         return false;
      
      try
      {
         int status = tx.getStatus();

         return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK;
      }
      catch (SystemException error)
      {
         throw new RuntimeException("Error during isUncommitted()", error);
      }
   }
1339825
@Override
    public void actionCommit() {

        List<Throwable> errors = new ArrayList<Throwable>();

        try {
            // set the edited message
            OpenCms.getLoginManager().setLoginMessage(getCms(), m_loginMessage);
            // update the system configuration
            OpenCms.writeConfiguration(CmsVariablesConfiguration.class);
            // clear the message object
            setDialogObject(null);
        } catch (Throwable t) {
            errors.add(t);
        }

        // set the list of errors to display when saving failed
        setCommitErrors(errors);
    }
57332
@Override
    public void execute() throws MojoExecutionException {
        new WisdomExecutor().stop(this);
        File pid = new File(getWisdomRootDirectory(), "RUNNING_PID");
        if (WisdomExecutor.waitForFileDeletion(pid)) {
            getLog().info("Wisdom server stopped.");
        } else {
            throw new MojoExecutionException("The " + pid.getName() + " file still exists after having stopped the " +
                    "Wisdom instance - check log");
        }
    }
486055
public function commit_transaction()
	{
		// Fake call of the commit
		if ($this->_transaction_depth <= 0)
		{
			return false;
		}

		if ($this->_transaction_depth - 1)
		{
			$result = $this->release_savepoint($this->_transaction_depth - 1);
			// If savepoint is not supported it is not an error
			! isset($result) and $result = true;
		}
		else
		{
			$this->_in_transaction = false;
			$result = $this->driver_commit();
		}

		$result and $this->_transaction_depth --;

		return $result;
	}
625318
protected boolean gitCheckTagExists(final String tagName) throws MojoFailureException, CommandLineException {
        CommandResult commandResult = executeGitCommandExitCode("show-ref", "--verify", "--quiet",
                "refs/tags/" + tagName);
        return commandResult.getExitCode() == SUCCESS_EXIT_CODE;
    }
712228
@Override
    public void actionCommit() {

        if (!hasCommitErrors()) {
            //check if we have to update an existing module or to create a new one
            Set<String> moduleNames = OpenCms.getModuleManager().getModuleNames();
            if (moduleNames.contains(m_module.getName())) {
                // update the module information
                try {
                    OpenCms.getModuleManager().updateModule(getCms(), m_module);
                } catch (CmsException e) {
                    addCommitError(e);
                }
            } else {
                try {
                    m_module = createModuleFolders((CmsModule)m_module.clone());
                    OpenCms.getModuleManager().addModule(getCms(), m_module);
                } catch (CmsException e) {
                    addCommitError(e);
                }
            }
        }

        if (!hasCommitErrors()) {
            // refresh the list
            Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject();
            if (objects != null) {
                objects.remove(CmsModulesList.class.getName());
            }
        }
    }
1288056
public void execute() throws MojoExecutionException, MojoFailureException {
    try {
      Set<File> thriftFiles = findThriftFiles();

      final File outputDirectory = getOutputDirectory();
      ImmutableSet<File> outputFiles = findGeneratedFilesInDirectory(getOutputDirectory());

      Set<String> compileRoots = new HashSet<String>();
      compileRoots.add("scrooge");

      if (thriftFiles.isEmpty()) {
        getLog().info("No thrift files to compile.");
      } else if (checkStaleness && ((lastModified(thriftFiles) + staleMillis) < lastModified(outputFiles))) {
        getLog().info("Generated thrift files up to date, skipping compile.");
        attachFiles(compileRoots);
      } else {
        outputDirectory.mkdirs();

        // Quick fix to fix issues with two mvn installs in a row (ie no clean)
        cleanDirectory(outputDirectory);

        getLog().info(format("compiling thrift files %s with Scrooge", thriftFiles));
        synchronized(lock) {
          ScroogeRunner runner = new ScroogeRunner();
          Map<String, String> thriftNamespaceMap = new HashMap<String, String>();
          for (ThriftNamespaceMapping mapping : thriftNamespaceMappings) {
            thriftNamespaceMap.put(mapping.getFrom(), mapping.getTo());
          }

          // Include thrifts from resource as well.
          Set<File> includes = thriftIncludes;
          includes.add(getResourcesOutputDirectory());

          // Include thrift root
          final File thriftSourceRoot = getThriftSourceRoot();
          if (thriftSourceRoot != null && thriftSourceRoot.exists()) {
            includes.add(thriftSourceRoot);
          }

          runner.compile(
                  getLog(),
                  includeOutputDirectoryNamespace ? new File(outputDirectory, "scrooge") : outputDirectory,
                  thriftFiles,
                  includes,
                  thriftNamespaceMap,
                  language,
                  thriftOpts);
        }
        attachFiles(compileRoots);
      }
    } catch (IOException e) {
      throw new MojoExecutionException("An IO error occurred", e);
    }
  }
818076
@Override
	public void execute() throws MojoExecutionException, MojoFailureException {
	    try {
			final ResourcesAggregator aggr = this.createResourcesAggregator();
			
			final File fullOutputDirectory = new File(baseOutputDirectory, skinOutputDirectory);
			this.doAggregation(aggr, skinConfigurationFile, fullOutputDirectory);
		} catch (AggregationException e) {
			throw new MojoExecutionException("aggregation failed", e);
		} catch (IOException e) {
			throw new MojoExecutionException("IOException occurred", e);
		}
	}
1351556
protected void committableUpdated() {
		boolean committable = isCommittable();
		if (hasChanged(oldCommittable, committable)) {
			oldCommittable = committable;
			firePropertyChange(COMMITTABLE_PROPERTY, !committable, committable);
		}
	}
1048029
public function commit()
    {
        if (!$this->transactor instanceof TransactionInterface) {
            throw new OrmException("Connection not set");
        }

        $this->checkForChangedRelations();
        $this->checkForUpdates();
        $this->preCommit();
        $this->transactor->beginTransaction();

        try {
            $this->insert();
            $this->update();
            $this->delete();
            $this->transactor->commit();
        } catch (\Exception $e) {
            $this->transactor->rollBack();
            $this->postRollback();
            throw new OrmException("Commit failed.\n" . $e->getMessage(), 0, $e);
        }

        $this->postCommit();

        // Clear our schedules
        $this->scheduledForInsertion = [];
        $this->scheduledForUpdate    = [];
        $this->scheduledForDeletion  = [];
        $this->entityRegistry->clearAggregateRoots();
    }
1168446
private static function commit()
    {
        $transaction = env('SIMPLES_TRANSACTION_CLASS', '\\Simples\\Persistence\\Transaction');
        if (!class_exists($transaction)) {
            return;
        }

        if (!method_exists($transaction, 'commit')) {
            throw new ErrorException("The transaction commit method was not found");
        }

        /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */
        if (!$transaction::commit()) {
            throw new ErrorException("Transaction can't commit the changes");
        }
    }
1253450
public synchronized void execute() throws MojoExecutionException, MojoFailureException {
        try {
            doExecute();
        }
        catch (Exception e) {
            //
            // NOTE: Wrap to avoid truncating the stacktrace
            //

            if (e instanceof MojoExecutionException) {
                throw new MojoExecutionException(e.getMessage(), e);
            }
            else if (e instanceof MojoFailureException) {
                MojoFailureException x = new MojoFailureException(e.getMessage());
                x.initCause(e);
                throw x;
            }
            else {
                throw new MojoExecutionException(e.getMessage(), e);
            }
        }
    }
1020313
protected function CheckForUpdate() {
		global $pgIP;
		$data = json_decode( $this->http->get( 'https://api.github.com/repos/phpseclib/phpseclib/branches/master', null, array(), false ), true );
		$this->commits = $data;
		if( !file_exists( $pgIP . 'Includes' . DIRECTORY_SEPARATOR . 'phpseclibupdate' ) ) return false;
		$log = unserialize( file_get_contents( $pgIP . 'Includes' . DIRECTORY_SEPARATOR . 'phpseclibupdate' ) );
		if( isset( $data['commit']['sha'] ) && $log['commit']['sha'] != $data['commit']['sha'] ) {
			pecho( "Updating SSH class!\n\n", PECHO_NOTICE );
			return false;
		}
		return true;
	}