/** * Set the identity of the user appearing in the reflog. * <p> * The timestamp portion of the identity is ignored. A new identity with the * current timestamp will be created automatically when the rename occurs * and the log record is written. * * @param pi * identity of the user. If null the identity will be * automatically determined based on the repository * configuration. */ public void setRefLogIdent(PersonIdent pi) { destination.setRefLogIdent(pi); }
private RefUpdate.Result updateRef(ObjectId newId) throws IOException { RefUpdate ru = db.updateRef(REF_NAME); ru.setExpectedOldObjectId(commit != null ? commit : ObjectId.zeroId()); ru.setNewObjectId(newId); ru.setRefLogIdent(pending.get(pending.size() - 1).ident); ru.setRefLogMessage(JGitText.get().storePushCertReflog, false); try (RevWalk rw = new RevWalk(reader)) { return ru.update(rw); } }
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { Ref currentRef = repo.exactRef(Constants.R_STASH); RefUpdate refUpdate = repo.updateRef(Constants.R_STASH); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); refUpdate.setForceRefLog(true); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
/** * Set the identity of the user appearing in the reflog. * <p> * The timestamp portion of the identity is ignored. A new identity with the * current timestamp will be created automatically when the rename occurs * and the log record is written. * * @param pi * identity of the user. If null the identity will be * automatically determined based on the repository * configuration. */ public void setRefLogIdent(final PersonIdent pi) { destination.setRefLogIdent(pi); }
/** * Set the identity of the user appearing in the reflog. * <p> * The timestamp portion of the identity is ignored. A new identity with the * current timestamp will be created automatically when the rename occurs * and the log record is written. * * @param pi * identity of the user. If null the identity will be * automatically determined based on the repository * configuration. */ public void setRefLogIdent(PersonIdent pi) { destination.setRefLogIdent(pi); }
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { if (ref == null) return; Ref currentRef = repo.findRef(ref); RefUpdate refUpdate = repo.updateRef(ref); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); refUpdate.setForceRefLog(true); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
ru.disableRefLog(); } else { ru.setRefLogIdent(refLogIdent); ru.setRefLogMessage(getRefLogMessage(cmd), isRefLogIncludingResult(cmd)); ru.setForceRefLog(isForceRefLog(cmd));
ru.setRefLogIdent(rp.getRefLogIdent()); ru.setRefLogMessage(refLogMessage, refLogIncludeResult); switch (getType()) {
private RefUpdate.Result updateRef(ObjectId newId) throws IOException { RefUpdate ru = db.updateRef(REF_NAME); ru.setExpectedOldObjectId(commit != null ? commit : ObjectId.zeroId()); ru.setNewObjectId(newId); ru.setRefLogIdent(pending.get(pending.size() - 1).ident); ru.setRefLogMessage(JGitText.get().storePushCertReflog, false); try (RevWalk rw = new RevWalk(reader)) { return ru.update(rw); } }
private RefUpdate.Result updateRef(ObjectId newId) throws IOException { RefUpdate ru = db.updateRef(REF_NAME); ru.setExpectedOldObjectId(commit != null ? commit : ObjectId.zeroId()); ru.setNewObjectId(newId); ru.setRefLogIdent(pending.get(pending.size() - 1).ident); ru.setRefLogMessage(JGitText.get().storePushCertReflog, false); try (RevWalk rw = new RevWalk(reader)) { return ru.update(rw); } }
public static void addToStash(RevCommit commit, Repository repo) throws IOException { RefUpdate update = repo.updateRef(R_STASH); update.setNewObjectId(commit); update.setRefLogIdent(commit.getCommitterIdent()); AnyObjectId prevStash = repo.resolve(R_STASH); update.setExpectedOldObjectId(prevStash != null ? prevStash : zeroId()); update.forceUpdate(); }
public static void addToStash(RevCommit commit, Repository repo) throws IOException { RefUpdate update = repo.updateRef(R_STASH); update.setNewObjectId(commit); update.setRefLogIdent(commit.getCommitterIdent()); AnyObjectId prevStash = repo.resolve(R_STASH); update.setExpectedOldObjectId(prevStash != null ? prevStash : zeroId()); update.forceUpdate(); }
dst.setRefLogIdent(destination.getRefLogIdent()); dst.setRefLogMessage(destination.getRefLogMessage(), false);
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { Ref currentRef = repo.exactRef(Constants.R_STASH); RefUpdate refUpdate = repo.updateRef(Constants.R_STASH); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { if (ref == null) return; Ref currentRef = repo.findRef(ref); RefUpdate refUpdate = repo.updateRef(ref); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { Ref currentRef = repo.exactRef(Constants.R_STASH); RefUpdate refUpdate = repo.updateRef(Constants.R_STASH); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); refUpdate.setForceRefLog(true); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
private void updateStashRef(ObjectId commitId, PersonIdent refLogIdent, String refLogMessage) throws IOException { if (ref == null) return; Ref currentRef = repo.findRef(ref); RefUpdate refUpdate = repo.updateRef(ref); refUpdate.setNewObjectId(commitId); refUpdate.setRefLogIdent(refLogIdent); refUpdate.setRefLogMessage(refLogMessage, false); refUpdate.setForceRefLog(true); if (currentRef != null) refUpdate.setExpectedOldObjectId(currentRef.getObjectId()); else refUpdate.setExpectedOldObjectId(ObjectId.zeroId()); refUpdate.forceUpdate(); }
ru.disableRefLog(); else { ru.setRefLogIdent(refLogIdent); ru.setRefLogMessage(refLogMessage, refLogIncludeResult);
ru.disableRefLog(); } else { ru.setRefLogIdent(refLogIdent); ru.setRefLogMessage(getRefLogMessage(cmd), isRefLogIncludingResult(cmd)); ru.setForceRefLog(isForceRefLog(cmd));
try { final RefUpdate ru = rp.getRepository().updateRef(getRefName()); ru.setRefLogIdent(rp.getRefLogIdent()); switch (getType()) { case DELETE: