@Signature public Memory status(@Nullable Set<String> paths, ArrayMemory settings) throws GitAPIException { StatusCommand status = getWrappedObject().status(); if (paths != null) { for (String path : paths) { status.addPath(path); } } if (settings != null && settings.isNotNull()) { if (settings.containsKey("ignoreSubmoduleMode")) { status.setIgnoreSubmodules(SubmoduleWalk.IgnoreSubmoduleMode.valueOf(settings.valueOfIndex("ignoreSubmoduleMode").toString())); } } Status call = status.call(); return GitUtils.valueOf(call); }
upstreamCommit)) { org.eclipse.jgit.api.Status status = Git.wrap(repo) .status().setIgnoreSubmodules(IgnoreSubmoduleMode.ALL).call(); if (status.hasUncommittedChanges()) { List<String> list = new ArrayList<>();
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"); } }
upstreamCommit)) { org.eclipse.jgit.api.Status status = Git.wrap(repo) .status().setIgnoreSubmodules(IgnoreSubmoduleMode.ALL).call(); if (status.hasUncommittedChanges()) { List<String> list = new ArrayList<>();
upstreamCommit)) { org.eclipse.jgit.api.Status status = Git.wrap(repo) .status().setIgnoreSubmodules(IgnoreSubmoduleMode.ALL).call(); if (status.hasUncommittedChanges()) { List<String> list = new ArrayList<String>();