/** * Set the message to include in the reflog. * <p> * Repository implementations may limit which reflogs are written by default, * based on the project configuration. If a repo is not configured to write * logs for this ref by default, setting the message alone may have no effect. * To indicate that the repo should write logs for this update in spite of * configured defaults, use {@link #setForceRefLog(boolean)}. * * @param msg * the message to describe this change. It may be null if * appendStatus is null in order not to append to the reflog * @param appendStatus * true if the status of the ref change (fast-forward or * forced-update) should be appended to the user supplied * message. */ public void setRefLogMessage(String msg, boolean appendStatus) { if (msg == null && !appendStatus) disableRefLog(); else if (msg == null && appendStatus) { refLogMessage = ""; //$NON-NLS-1$ refLogIncludeResult = true; } else { refLogMessage = msg; refLogIncludeResult = appendStatus; } }
private boolean linkHEAD(RefUpdate target) { try { RefUpdate u = refdb.newUpdate(Constants.HEAD, false); u.disableRefLog(); switch (u.link(target.getName())) { case NEW: case FORCED: case NO_CHANGE: return true; default: return false; } } catch (IOException e) { return false; } } }
private RefUpdate createRefUpdate(Ref stashRef) throws IOException { RefUpdate update = repo.updateRef(R_STASH); update.disableRefLog(); update.setExpectedOldObjectId(stashRef.getObjectId()); update.setForceUpdate(true); return update; }
/** * Set the message to include in the reflog. * * @param msg * the message to describe this change. It may be null if * appendStatus is null in order not to append to the reflog * @param appendStatus * true if the status of the ref change (fast-forward or * forced-update) should be appended to the user supplied * message. */ public void setRefLogMessage(final String msg, final boolean appendStatus) { if (msg == null && !appendStatus) disableRefLog(); else if (msg == null && appendStatus) { refLogMessage = ""; //$NON-NLS-1$ refLogIncludeResult = true; } else { refLogMessage = msg; refLogIncludeResult = appendStatus; } }
/** * Set the message to include in the reflog. * <p> * Repository implementations may limit which reflogs are written by default, * based on the project configuration. If a repo is not configured to write * logs for this ref by default, setting the message alone may have no effect. * To indicate that the repo should write logs for this update in spite of * configured defaults, use {@link #setForceRefLog(boolean)}. * * @param msg * the message to describe this change. It may be null if * appendStatus is null in order not to append to the reflog * @param appendStatus * true if the status of the ref change (fast-forward or * forced-update) should be appended to the user supplied * message. */ public void setRefLogMessage(String msg, boolean appendStatus) { if (msg == null && !appendStatus) disableRefLog(); else if (msg == null && appendStatus) { refLogMessage = ""; //$NON-NLS-1$ refLogIncludeResult = true; } else { refLogMessage = msg; refLogIncludeResult = appendStatus; } }
head.disableRefLog(); head.link(Constants.R_HEADS + Constants.MASTER);
newHead.disableRefLog(); newHead.link(head.getName()); addMergeConfig(clonedRepo, head);
ru.disableRefLog(); } else { String message = refName + ": updating " + Constants.HEAD; //$NON-NLS-1$
RefUpdate ru = refdb.newUpdate(cmd.getRefName(), false); if (isRefLogDisabled(cmd)) { ru.disableRefLog(); } else { ru.setRefLogIdent(refLogIdent);
private boolean linkHEAD(RefUpdate target) { try { RefUpdate u = refdb.newUpdate(Constants.HEAD, false); u.disableRefLog(); switch (u.link(target.getName())) { case NEW: case FORCED: case NO_CHANGE: return true; default: return false; } } catch (IOException e) { return false; } } }
private boolean linkHEAD(RefUpdate target) { try { RefUpdate u = refdb.newUpdate(Constants.HEAD, false); u.disableRefLog(); switch (u.link(target.getName())) { case NEW: case FORCED: case NO_CHANGE: return true; default: return false; } } catch (IOException e) { return false; } } }
private RefUpdate createRefUpdate(final Ref stashRef) throws IOException { RefUpdate update = repo.updateRef(R_STASH); update.disableRefLog(); update.setExpectedOldObjectId(stashRef.getObjectId()); update.setForceUpdate(true); return update; }
private RefUpdate createRefUpdate(Ref stashRef) throws IOException { RefUpdate update = repo.updateRef(R_STASH); update.disableRefLog(); update.setExpectedOldObjectId(stashRef.getObjectId()); update.setForceUpdate(true); return update; }
source.disableRefLog(); if (source.delete(rw) != Result.FORCED) { renameLog(tmp, source);
private void doCheckout(final Ref branch) throws IOException { if (branch == null) throw die(CLIText.get().cannotChekoutNoHeadsAdvertisedByRemote); if (!Constants.HEAD.equals(branch.getName())) { RefUpdate u = db.updateRef(Constants.HEAD); u.disableRefLog(); u.link(branch.getName()); } final RevCommit commit = parseCommit(branch); final RefUpdate u = db.updateRef(Constants.HEAD); u.setNewObjectId(commit); u.forceUpdate(); DirCache dc = db.lockDirCache(); DirCacheCheckout co = new DirCacheCheckout(db, dc, commit.getTree()); co.checkout(); }
/** * Method description * * * @param branch * * @throws IOException */ private void doCheckout(final Ref branch) throws IOException { if (!Constants.HEAD.equals(branch.getName())) { RefUpdate u = repository.updateRef(Constants.HEAD); u.disableRefLog(); u.link(branch.getName()); } RevCommit commit = parseCommit(branch); RefUpdate u = repository.updateRef(Constants.HEAD); u.setNewObjectId(commit); u.forceUpdate(); DirCache dc = repository.lockDirCache(); DirCacheCheckout co = new DirCacheCheckout(repository, dc, commit.getTree()); co.checkout(); }
newHead.disableRefLog(); newHead.link(head.getName()); addMergeConfig(clonedRepo, head);
newHead.disableRefLog(); newHead.link(head.getName()); addMergeConfig(clonedRepo, head);
RefUpdate ru = refdb.newUpdate(cmd.getRefName(), false); if (isRefLogDisabled()) ru.disableRefLog(); else { ru.setRefLogIdent(refLogIdent);
RefUpdate ru = refdb.newUpdate(cmd.getRefName(), false); if (isRefLogDisabled(cmd)) { ru.disableRefLog(); } else { ru.setRefLogIdent(refLogIdent);