Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.ReflogCommand


  @Argument(metaVar = "metaVar_ref")
  private String ref;

  @Override
  protected void run() throws Exception {
    ReflogCommand cmd = new Git(db).reflog();
    if (ref != null)
      cmd.setRef(ref);
    Collection<ReflogEntry> entries = cmd.call();
    int i = 0;
    for (ReflogEntry entry : entries) {
      outw.println(toString(entry, i++));
    }
  }
View Full Code Here


  }

  public Object[] getElements(Object inputElement) {
    if (inputElement instanceof ReflogInput) {
      ReflogInput input = (ReflogInput) inputElement;
      ReflogCommand command = new Git(input.repository).reflog();
      command.setRef(input.ref);
      try {
        return command.call().toArray();
      } catch (Exception e) {
        Activator.logError("Error running reflog command", e); //$NON-NLS-1$
      }
    }
    return new Object[0];
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.ReflogCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.