@Signature public void add(String filePattern, ArrayMemory settings) throws GitAPIException { AddCommand addCommand = getWrappedObject().add(); addCommand.addFilepattern(filePattern); if (settings != null && settings.isNotNull()) { addCommand.setUpdate(settings.valueOfIndex("update").toBoolean()); } DirCache dirCache = addCommand.call(); }
git.add() .addFilepattern(".") //$NON-NLS-1$ .setUpdate(true).call(); } catch (NoFilepatternException e) {
@Override protected void run() throws Exception { AddCommand addCmd = new Git(db).add(); addCmd.setUpdate(update); for (String p : filepatterns) addCmd.addFilepattern(p); addCmd.call(); } }
public synchronized void backup() throws Exception { repo.add().setUpdate(false).addFilepattern(".").call(); Status status = repo.status().setIgnoreSubmodules(SubmoduleWalk.IgnoreSubmoduleMode.ALL).call(); log.debug("status.getUncommittedChanges() = " + status.getUncommittedChanges()); if (!status.getUncommittedChanges().isEmpty()) { for (String missingPath : status.getMissing()) { repo.rm().addFilepattern(missingPath).call(); } log.info("Changes detected in the following files: " + status.getUncommittedChanges()); repo.commit() .setMessage("Backing up data dir") .setAuthor("AppRunner BackupService", "noemail@example.org") .call(); Iterable<PushResult> pushResults = repo.push().call(); for (PushResult pushResult : pushResults) { log.info("Result of pushing to remote: " + pushResult.getRemoteUpdates()); } } else { log.info("No changes to back up"); } }
public void stageAndPushDeletedFile() { try { Git git = this.gitOpen(gitDir); git.add().addFilepattern(".").setUpdate(true).call(); git.commit().setMessage("wipe").call(); PushCommand command = git.push().setForce(true); command.setCredentialsProvider(new UsernamePasswordCredentialsProvider(user, password)); command.call(); } catch (GitAPIException e) { log.error(e.getMessage(), e); } }
git.add().addFilepattern(".").setUpdate(true).call();
git.add().setUpdate(true).addFilepattern(".").call();
git.add() .addFilepattern(".") //$NON-NLS-1$ .setUpdate(true).call(); } catch (NoFilepatternException e) {
git.add() .addFilepattern(".") //$NON-NLS-1$ .setUpdate(true).call(); } catch (NoFilepatternException e) {