org.netbeans.libs.git/1 1.1

org.netbeans.libs.git
Class GitStatus

java.lang.Object
  extended by 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.
 
Method Summary
 GitConflictDescriptor getConflictDescriptor()
           
 File getFile()
           
 File getOldPath()
           
 String getRelativePath()
           
 GitStatus.Status getStatusHeadIndex()
           
 GitStatus.Status getStatusHeadWC()
           
 GitStatus.Status getStatusIndexWC()
           
 boolean isConflict()
          States if the file is currently in conflict and needs to be resolved.
 boolean isCopied()
           
 boolean isFolder()
           
 boolean isRenamed()
           
 boolean isTracked()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.

org.netbeans.libs.git/1 1.1

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.