/** * Whether the {@code Constants#HEAD} reference needs to be linked to the * new destination name. * * @return true if the {@code Constants#HEAD} reference needs to be linked * to the new destination name. * @throws java.io.IOException * the current value of {@code HEAD} cannot be read. */ protected boolean needToUpdateHEAD() throws IOException { Ref head = source.getRefDatabase().getRef(Constants.HEAD); if (head != null && head.isSymbolic()) { head = head.getTarget(); return head.getName().equals(source.getName()); } return false; } }
if (!target.startsWith(Constants.R_REFS)) throw new IllegalArgumentException(MessageFormat.format(JGitText.get().illegalArgumentNotA, Constants.R_REFS)); if (checkConflicting && getRefDatabase().isNameConflicting(getName())) return Result.LOCK_FAILURE; try { return Result.LOCK_FAILURE; final Ref old = getRefDatabase().getRef(getName()); if (old != null && old.isSymbolic()) { final Ref dst = old.getTarget(); setOldObjectId(old.getObjectId()); final Ref dst = getRefDatabase().getRef(target); if (dst != null && dst.getObjectId() != null) setNewObjectId(dst.getObjectId());
if (myName.startsWith(Constants.R_HEADS) && !getRepository().isBare()) { Ref head = getRefDatabase().getRef(Constants.HEAD); while (head != null && head.isSymbolic()) { head = head.getTarget();
&& getRefDatabase().isNameConflicting(getName())) { return Result.LOCK_FAILURE;
/** * @return true if the {@code Constants#HEAD} reference needs to be linked * to the new destination name. * @throws IOException * the current value of {@code HEAD} cannot be read. */ protected boolean needToUpdateHEAD() throws IOException { Ref head = source.getRefDatabase().getRef(Constants.HEAD); if (head != null && head.isSymbolic()) { head = head.getTarget(); return head.getName().equals(source.getName()); } return false; } }
/** * Whether the {@code Constants#HEAD} reference needs to be linked to the * new destination name. * * @return true if the {@code Constants#HEAD} reference needs to be linked * to the new destination name. * @throws java.io.IOException * the current value of {@code HEAD} cannot be read. */ protected boolean needToUpdateHEAD() throws IOException { Ref head = source.getRefDatabase().getRef(Constants.HEAD); if (head != null && head.isSymbolic()) { head = head.getTarget(); return head.getName().equals(source.getName()); } return false; } }
if (!target.startsWith(Constants.R_REFS)) throw new IllegalArgumentException(MessageFormat.format(JGitText.get().illegalArgumentNotA, Constants.R_REFS)); if (checkConflicting && getRefDatabase().isNameConflicting(getName())) return Result.LOCK_FAILURE; try { return Result.LOCK_FAILURE; final Ref old = getRefDatabase().getRef(getName()); if (old != null && old.isSymbolic()) { final Ref dst = old.getTarget(); setOldObjectId(old.getObjectId()); final Ref dst = getRefDatabase().getRef(target); if (dst != null && dst.getObjectId() != null) setNewObjectId(dst.getObjectId());
if (!target.startsWith(Constants.R_REFS)) throw new IllegalArgumentException(MessageFormat.format(JGitText.get().illegalArgumentNotA, Constants.R_REFS)); if (checkConflicting && getRefDatabase().isNameConflicting(getName())) return Result.LOCK_FAILURE; try { return Result.LOCK_FAILURE; final Ref old = getRefDatabase().getRef(getName()); if (old != null && old.isSymbolic()) { final Ref dst = old.getTarget(); setOldObjectId(old.getObjectId()); final Ref dst = getRefDatabase().getRef(target); if (dst != null && dst.getObjectId() != null) setNewObjectId(dst.getObjectId());
if (myName.startsWith(Constants.R_HEADS) && !getRepository().isBare()) { Ref head = getRefDatabase().getRef(Constants.HEAD); while (head != null && head.isSymbolic()) { head = head.getTarget();
if (myName.startsWith(Constants.R_HEADS) && !getRepository().isBare()) { Ref head = getRefDatabase().getRef(Constants.HEAD); while (head != null && head.isSymbolic()) { head = head.getTarget();
if (oldValue == null && checkConflicting && getRefDatabase().isNameConflicting(getName())) return Result.LOCK_FAILURE; try {
&& getRefDatabase().isNameConflicting(getName())) { return Result.LOCK_FAILURE;