Class Status
java.lang.Object
org.eclipse.jgit.api.Status
A class telling where the working-tree, the index and the current HEAD differ
from each other. Collections are exposed containing the paths of the modified
files. E.g. to find out which files are dirty in the working tree (modified
but not added) you would inspect the collection returned by
getModified().
The same path can be returned by multiple getters. E.g. if a modification has
been added to the index and afterwards the corresponding working tree file is
again modified this path will be returned by getModified() and
getChanged()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final IndexDiffprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdded()Get files added to the indexGet changed files from HEAD to indexGet conflicting filesGet StageState of conflicting filesGet ignored files which are not in the indexGet missing filesGet modified files relative to the indexGet removed filesGet uncommitted changes, i.e.Get untracked filesGet untracked foldersbooleanWhether there are uncommitted changesbooleanisClean()Whether the status is clean
-
Field Details
-
diff
-
clean
private final boolean clean -
hasUncommittedChanges
private final boolean hasUncommittedChanges
-
-
Constructor Details
-
Status
-
-
Method Details
-
isClean
public boolean isClean()Whether the status is clean- Returns:
trueif no differences exist between the working-tree, the index, and the current HEAD,falseif differences do exist
-
hasUncommittedChanges
public boolean hasUncommittedChanges()Whether there are uncommitted changes- Returns:
trueif any tracked file is changed- Since:
- 3.2
-
getAdded
-
getChanged
-
getRemoved
-
getMissing
-
getModified
-
getUntracked
-
getUntrackedFolders
-
getConflicting
-
getConflictingStageState
Get StageState of conflicting files- Returns:
- a map from conflicting path to its
IndexDiff.StageState. - Since:
- 3.0
-
getIgnoredNotInIndex
-
getUncommittedChanges
-