Browse Source

LogCommand: Remove outdated TODO and improve docs

Change-Id: I368be12e7bdc3c711e9f474ead312006513764b7
Signed-off-by: Robin Stocker <robin@nibor.org>
tags/v3.1.0.201309270735-rc1
Robin Stocker 10 years ago
parent
commit
f68ffb48eb
1 changed files with 17 additions and 3 deletions
  1. 17
    3
      org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java

+ 17
- 3
org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java View File

@@ -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>

Loading…
Cancel
Save