org.netbeans.libs.git
Class GitStatus
java.lang.Object
org.netbeans.libs.git.GitStatus
public final class GitStatus
- extends Object
Provides overall information about git status of a certain resource
in a git repository.
|
Nested Class Summary |
static class |
GitStatus.Status
File's status, respectively the state of a file between two trees
(can be HEAD vs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getFile
public File getFile()
- Returns:
- file the status is associated with
getRelativePath
public String getRelativePath()
- Returns:
- relative path of the file in the repository
getStatusHeadIndex
public GitStatus.Status getStatusHeadIndex()
- Returns:
- file's state/difference between the HEAD and Index
getStatusIndexWC
public GitStatus.Status getStatusIndexWC()
- Returns:
- file's state/difference between the Index and Working tree
getStatusHeadWC
public GitStatus.Status getStatusHeadWC()
- Returns:
- file's state/difference between the HEAD and Working tree
isTracked
public boolean isTracked()
- Returns:
true if the file is tracked by Git,
meaning it has been already committed or added to the Index
isConflict
public boolean isConflict()
- States if the file is currently in conflict and needs to be resolved.
If the file is in conflict then:
- Returns:
true if the file is currently in conflict.
isFolder
public boolean isFolder()
- Returns:
true if the file references a folder.
isCopied
public boolean isCopied()
- Returns:
true if the file is tracked in the Index as copied.
isRenamed
public boolean isRenamed()
- Returns:
true if the file is tracked in the Index as renamed.
getOldPath
public File getOldPath()
- Returns:
null if the file is neither copied or renamed, the original file this
file has been copied or renamed from otherwise.
getConflictDescriptor
public GitConflictDescriptor getConflictDescriptor()
- Returns:
- more information about the conflict or
null if the file is not in conflict.