Browse Source

Allow to set target of DescribeCommand

Change-Id: I04805ce20cc203f5e491406c39b71e7017553b37
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v3.2.0.201311130903-m3
Matthias Sohn 10 years ago
parent
commit
3c2c8b47ff
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java

+ 3
- 2
org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java View File

* @throws IOException * @throws IOException
* a pack file or loose object could not be read. * a pack file or loose object could not be read.
*/ */
DescribeCommand setTarget(ObjectId target) throws IOException {
public DescribeCommand setTarget(ObjectId target) throws IOException {
this.target = w.parseCommit(target); this.target = w.parseCommit(target);
return this; return this;
} }
* @throws IOException * @throws IOException
* a pack file or loose object could not be read. * a pack file or loose object could not be read.
*/ */
DescribeCommand setTarget(String rev) throws IOException, RefNotFoundException {
public DescribeCommand setTarget(String rev) throws IOException,
RefNotFoundException {
ObjectId id = repo.resolve(rev); ObjectId id = repo.resolve(rev);
if (id == null) if (id == null)
throw new RefNotFoundException(MessageFormat.format(JGitText.get().refNotResolved, rev)); throw new RefNotFoundException(MessageFormat.format(JGitText.get().refNotResolved, rev));

Loading…
Cancel
Save