aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2013-08-16 15:38:43 +0200
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2013-08-25 10:42:40 -0400
commitf68ffb48eb16171da3d42b91f20c842201ea7431 (patch)
tree5f1a1367be2ce541252c1566466cff28f5389530 /org.eclipse.jgit
parentc0fc5dc50441ba9b4a3e642e2a598936188ad252 (diff)
downloadjgit-f68ffb48eb16171da3d42b91f20c842201ea7431.tar.gz
jgit-f68ffb48eb16171da3d42b91f20c842201ea7431.zip
LogCommand: Remove outdated TODO and improve docs
Change-Id: I368be12e7bdc3c711e9f474ead312006513764b7 Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.jgit')
-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>