Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2013-08-16 13:38:43 +0000
committerGerrit Code Review @ Eclipse.org2013-08-25 14:42:40 +0000
commitf68ffb48eb16171da3d42b91f20c842201ea7431 (patch)
tree5f1a1367be2ce541252c1566466cff28f5389530
parentc0fc5dc50441ba9b4a3e642e2a598936188ad252 (diff)
downloadjgit-f68ffb48eb16171da3d42b91f20c842201ea7431.tar.gz
jgit-f68ffb48eb16171da3d42b91f20c842201ea7431.tar.xz
jgit-f68ffb48eb16171da3d42b91f20c842201ea7431.zip
LogCommand: Remove outdated TODO and improve docs
Change-Id: I368be12e7bdc3c711e9f474ead312006513764b7 Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
index cad2790aca..53fc70d02d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
@@ -74,10 +74,24 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter;
* to finally execute the command. Each instance of this class should only be
* used for one invocation of the command (means: one call to {@link #call()})
* <p>
- * This is currently a very basic implementation which takes only one starting
- * revision as option.
+ * Examples (<code>git</code> is a {@link Git} instance):
+ * <p>
+ * Get newest 10 commits, starting from the current branch:
+ *
+ * <pre>
+ * ObjectId head = repository.resolve(Constants.HEAD);
+ *
+ * Iterable&lt;RevCommit&gt; commits = git.log().add(head).setMaxCount(10).call();
+ * </pre>
+ * <p>
*
- * TODO: add more options (revision ranges, sorting, ...)
+ * <p>
+ * Get commits only for a specific file:
+ *
+ * <pre>
+ * git.log().add(head).addPath(&quot;dir/filename.txt&quot;).call();
+ * </pre>
+ * <p>
*
* @see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html"
* >Git documentation about Log</a>

Back to the top