Permalink
Browse files

added describe() to AGitRepository

  • Loading branch information...
1 parent 7c29133 commit 9cda7ca73954b293888a1c57cff0ec80ef1115f9 @musterknabe musterknabe committed Jun 5, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 AGitRepository.php
View
@@ -239,6 +239,17 @@ public function status()
}
/**
+ * Describes the state of the current repository (returns closest tag to current HEAD)
+ * @param string $options specify "--tags" to fetch all tags (defaults to annotated tags only).
+ * @see git help describe for more options and exact return values.
+ * @return string the response from git
+ */
+ public function describe($options = '')
+ {
+ return $this->run("describe " . $options);
+ }
+
+ /**
* Switches to the given branch
* @param string $branchName the name of the branch to check out
* @param boolean $create whether to create the branch or not

0 comments on commit 9cda7ca

Please sign in to comment.