/** * Executes the command. * * @return an {@link Optional} of the {@link ObjectId} that was resolved, or * {@link Optional#absent()} if it did not resolve. */ @Override protected Optional<ObjectId> _call() { checkState(treeishRefSpec != null || treeish != null, "tree-ish ref spec not set"); ObjectStore source = this.source == null ? objectDatabase() : this.source; Optional<ObjectId> resolved; if (treeishRefSpec != null) { resolved = command(RevParse.class).setSource(source).setRefSpec(treeishRefSpec).call(); } else { resolved = Optional.of(treeish); } return call(resolved); }
/** * Executes the command. * * @return an {@link Optional} of the {@link ObjectId} that was resolved, or * {@link Optional#absent()} if it did not resolve. */ @Override protected Optional<ObjectId> _call() { checkState(treeishRefSpec != null || treeish != null, "tree-ish ref spec not set"); ObjectStore source = this.source == null ? objectDatabase() : this.source; Optional<ObjectId> resolved; if (treeishRefSpec != null) { resolved = command(RevParse.class).setSource(source).setRefSpec(treeishRefSpec).call(); } else { resolved = Optional.of(treeish); } return call(resolved); }
ObjectStore source = this.source == null ? objectDatabase() : this.source;
ObjectStore source = this.source == null ? objectDatabase() : this.source;