org.eclipse.jgit.api

## Class Status

- java.lang.Object
- - org.eclipse.jgit.api.Status

    public class Status
    extends Object

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()`

### Constructor Summary

Constructors
Constructor and Description
`Status(IndexDiff diff)`

### Method Summary

Methods
`Set<String>` `getAdded()`
`Set<String>` `getChanged()`
`Set<String>` `getConflicting()`
`Map<String,IndexDiff.StageState>` `getConflictingStageState()`
`Set<String>` `getIgnoredNotInIndex()`
`Set<String>` `getMissing()`
`Set<String>` `getModified()`
`Set<String>` `getRemoved()`
`Set<String>` `getUncommittedChanges()`
`Set<String>` `getUntracked()`
`Set<String>` `getUntrackedFolders()`
`boolean` `hasUncommittedChanges()`
`boolean` `isClean()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Status

    public Status(IndexDiff diff)

Parameters:
  `diff` -

### Method Detail

#### isClean

    public boolean isClean()

Returns:
  true if no differences exist between the working-tree, the index, and the current HEAD, false if differences do exist

#### hasUncommittedChanges

    public boolean hasUncommittedChanges()

Returns:
  true if any tracked file is changed
Since:
  3.2

#### getAdded

    public Set<String> getAdded()

Returns:
  list of files added to the index, not in HEAD (e.g. what you get if you call 'git add ...' on a newly created file)

#### getChanged

    public Set<String> getChanged()

Returns:
  list of files changed from HEAD to index (e.g. what you get if you modify an existing file and call 'git add ...' on it)

#### getRemoved

    public Set<String> getRemoved()

Returns:
  list of files removed from index, but in HEAD (e.g. what you get if you call 'git rm ...' on a existing file)

#### getMissing

    public Set<String> getMissing()

Returns:
  list of files in index, but not filesystem (e.g. what you get if you call 'rm ...' on a existing file)

#### getModified

    public Set<String> getModified()

Returns:
  list of files modified on disk relative to the index (e.g. what you get if you modify an existing file without adding it to the index)

#### getUntracked

    public Set<String> getUntracked()

Returns:
  list of files that are not ignored, and not in the index. (e.g. what you get if you create a new file without adding it to the index)

#### getUntrackedFolders

    public Set<String> getUntrackedFolders()

Returns:
  set of directories that are not ignored, and not in the index.

#### getConflicting

    public Set<String> getConflicting()

Returns:
  list of files that are in conflict. (e.g what you get if you modify file that was modified by someone else in the meantime)

#### getConflictingStageState

    public Map<String,IndexDiff.StageState> getConflictingStageState()

Returns:
  a map from conflicting path to its `IndexDiff.StageState`.
Since:
  3.0

#### getIgnoredNotInIndex

    public Set<String> getIgnoredNotInIndex()

Returns:
  set of files and folders that are ignored and not in the index.

#### getUncommittedChanges

    public Set<String> getUncommittedChanges()

Returns:
  set of files and folders that are known to the repo and changed either in the index or in the working tree.
Since:
  3.2