private void addPrefix(String prefix, Map<ObjectId, String> nonCommits, FIFORevQueue pending) throws IOException { for (Ref ref : repo.getRefDatabase().getRefsByPrefix(prefix)) addRef(ref, nonCommits, pending); }
/** * Add all annotated tags under {@code refs/tags/} to the set that all * results must match. * <p> * Calls {@link #addRef(Ref)}; see that method for a note on matching * priority. * * @return {@code this} * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling * {@link java.lang.Exception#getCause()}. */ public NameRevCommand addAnnotatedTags() { checkCallable(); if (refs == null) refs = new ArrayList<>(); try { for (Ref ref : repo.getRefDatabase() .getRefsByPrefix(Constants.R_TAGS)) { ObjectId id = ref.getObjectId(); if (id != null && (walk.parseAny(id) instanceof RevTag)) addRef(ref); } } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } return this; }
if (refs != null) { for (Ref ref : refs) addRef(ref, nonCommits, pending);
private void addPrefix(String prefix, Map<ObjectId, String> nonCommits, FIFORevQueue pending) throws IOException { for (Ref ref : repo.getRefDatabase().getRefs(prefix).values()) addRef(ref, nonCommits, pending); }
private void addPrefix(String prefix, Map<ObjectId, String> nonCommits, FIFORevQueue pending) throws IOException { for (Ref ref : repo.getRefDatabase().getRefsByPrefix(prefix)) addRef(ref, nonCommits, pending); }
/** * Add all annotated tags under {@code refs/tags/} to the set that all results * must match. * <p> * Calls {@link #addRef(Ref)}; see that method for a note on matching * priority. * * @return {@code this} * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling * {@link Exception#getCause()}. */ public NameRevCommand addAnnotatedTags() { checkCallable(); if (refs == null) refs = new ArrayList<Ref>(); try { for (Ref ref : repo.getRefDatabase().getRefs(Constants.R_TAGS).values()) { ObjectId id = ref.getObjectId(); if (id != null && (walk.parseAny(id) instanceof RevTag)) addRef(ref); } } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } return this; }
/** * Add all annotated tags under {@code refs/tags/} to the set that all * results must match. * <p> * Calls {@link #addRef(Ref)}; see that method for a note on matching * priority. * * @return {@code this} * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling * {@link java.lang.Exception#getCause()}. */ public NameRevCommand addAnnotatedTags() { checkCallable(); if (refs == null) refs = new ArrayList<>(); try { for (Ref ref : repo.getRefDatabase() .getRefsByPrefix(Constants.R_TAGS)) { ObjectId id = ref.getObjectId(); if (id != null && (walk.parseAny(id) instanceof RevTag)) addRef(ref); } } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } return this; }
if (refs != null) { for (Ref ref : refs) addRef(ref, nonCommits, pending);
if (refs != null) { for (Ref ref : refs) addRef(ref, nonCommits, pending);