public static ArrayMemory valueOf(Status value) { ArrayMemory memory = new ArrayMemory(); memory.refOfIndex("added").assign(ArrayMemory.ofStringCollection(value.getAdded())); memory.refOfIndex("changed").assign(ArrayMemory.ofStringCollection(value.getChanged())); memory.refOfIndex("conflicting").assign(ArrayMemory.ofStringCollection(value.getConflicting())); memory.refOfIndex("ignoredNotInIndex").assign(ArrayMemory.ofStringCollection(value.getIgnoredNotInIndex())); memory.refOfIndex("missing").assign(ArrayMemory.ofStringCollection(value.getMissing())); memory.refOfIndex("modified").assign(ArrayMemory.ofStringCollection(value.getModified())); memory.refOfIndex("removed").assign(ArrayMemory.ofStringCollection(value.getRemoved())); memory.refOfIndex("uncommittedChanges").assign(ArrayMemory.ofStringCollection(value.getUncommittedChanges())); memory.refOfIndex("untracked").assign(ArrayMemory.ofStringCollection(value.getUntracked())); memory.refOfIndex("untrackedFolders").assign(ArrayMemory.ofStringCollection(value.getUntrackedFolders())); return memory; }
public static void main(String[] args) throws IOException, GitAPIException { try (Repository repository = CookbookHelper.openJGitCookbookRepository()) { try (Git git = new Git(repository)) { Status status = git.status().call(); System.out.println("Added: " + status.getAdded()); System.out.println("Changed: " + status.getChanged()); System.out.println("Conflicting: " + status.getConflicting()); System.out.println("ConflictingStageState: " + status.getConflictingStageState()); System.out.println("IgnoredNotInIndex: " + status.getIgnoredNotInIndex()); System.out.println("Missing: " + status.getMissing()); System.out.println("Modified: " + status.getModified()); System.out.println("Removed: " + status.getRemoved()); System.out.println("Untracked: " + status.getUntracked()); System.out.println("UntrackedFolders: " + status.getUntrackedFolders()); } } } }
public static void main(String[] args) throws IOException, GitAPIException { try (Repository repository = CookbookHelper.openJGitCookbookRepository()) { try (Git git = new Git(repository)) { Status status = git.status().call(); System.out.println("Added: " + status.getAdded()); System.out.println("Changed: " + status.getChanged()); System.out.println("Conflicting: " + status.getConflicting()); System.out.println("ConflictingStageState: " + status.getConflictingStageState()); System.out.println("IgnoredNotInIndex: " + status.getIgnoredNotInIndex()); System.out.println("Missing: " + status.getMissing()); System.out.println("Modified: " + status.getModified()); System.out.println("Removed: " + status.getRemoved()); System.out.println("Untracked: " + status.getUntracked()); System.out.println("UntrackedFolders: " + status.getUntrackedFolders()); } } } }
for (String p : status.getIgnoredNotInIndex()) { File f = new File(repo.getWorkTree(), p); if (fs.isFile(f) || fs.isSymLink(f)) { status.getIgnoredNotInIndex(), true); Set<String> notIgnoredDirs = filterIgnorePaths(untrackedDirs, status.getIgnoredNotInIndex(), false);
private boolean localRepoIsDirty(Git git) throws GitAPIException { Status status = git.status().call(); List potentialIssues = new ArrayList(); potentialIssues.addAll(status.getConflicting()); potentialIssues.addAll(status.getIgnoredNotInIndex()); potentialIssues.addAll(status.getAdded()); potentialIssues.addAll(status.getChanged()); potentialIssues.addAll(status.getMissing()); potentialIssues.addAll(status.getModified()); potentialIssues.addAll(status.getRemoved()); potentialIssues.addAll(status.getUncommittedChanges()); potentialIssues.addAll(status.getUntracked()); potentialIssues.addAll(status.getUntrackedFolders()); return !potentialIssues.isEmpty(); }
sbInfo.append("Conflicting: ").append(status.getConflicting()).append("\n"); sbInfo.append("ConflictingStageState: ").append(status.getConflictingStageState()).append("\n"); sbInfo.append("IgnoredNotInIndex: ").append(status.getIgnoredNotInIndex()).append("\n"); sbInfo.append("Missing: ").append(status.getMissing()).append("\n"); sbInfo.append("Modified: ").append(status.getModified()).append("\n");
for (String p : status.getIgnoredNotInIndex()) { File f = new File(repo.getWorkTree(), p); if (fs.isFile(f) || fs.isSymLink(f)) status.getIgnoredNotInIndex(), true); Set<String> notIgnoredDirs = filterIgnorePaths( untrackedAndIgnoredDirs, status.getIgnoredNotInIndex(), false);
for (String p : status.getIgnoredNotInIndex()) { File f = new File(repo.getWorkTree(), p); if (fs.isFile(f) || fs.isSymLink(f)) { status.getIgnoredNotInIndex(), true); Set<String> notIgnoredDirs = filterIgnorePaths(untrackedDirs, status.getIgnoredNotInIndex(), false);