aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2011-03-23 00:06:07 +0100
committerChris Aniszczyk <caniszczyk@gmail.com>2011-03-23 11:08:21 -0500
commitc160293d71a3d2cf1f4a89868e2bf6c420f50cf0 (patch)
treeb607fc84bd3b4bb60770c046c29b3ef3c3189273 /org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
parentccd3d83719eb89045f8b371b041c8e6456d3b403 (diff)
downloadjgit-c160293d71a3d2cf1f4a89868e2bf6c420f50cf0.tar.gz
jgit-c160293d71a3d2cf1f4a89868e2bf6c420f50cf0.zip
Add status command to GIT api
Allow users of the GIT api to get to know the state of their workingtree and index by adding a status command. The implementation is mainly a wrapper around IndexDiff class. Better support for multiple stages in the index (conflict situations) is still missing. An appropriate change to IndexDiff and StatusCommand will come in a subsequent commit. Bug: 337296 Change-Id: Idb390375a68611853c1c903299ec678c89b081dc Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
index 88643f1702..d2f2059160 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
@@ -335,6 +335,19 @@ public class Git {
}
/**
+ * Returns a command object to execute a {@code status} command
+ *
+ * @see <a
+ * href="http://www.kernel.org/pub/software/scm/git/docs/git-status.html"
+ * >Git documentation about status</a>
+ * @return a {@link StatusCommand} used to collect all optional parameters
+ * and to finally execute the {@code status} command
+ */
+ public StatusCommand status() {
+ return new StatusCommand(repo);
+ }
+
+ /**
* @return the git repository this class is interacting with
*/
public Repository getRepository() {