/** {@inheritDoc} */ public void setCredentials(StandardUsernameCredentials cred) { clearCredentials(); addDefaultCredentials(cred); }
/** {@inheritDoc} */ public void changelog(String revFrom, String revTo, OutputStream outputStream) throws GitException, InterruptedException { changelog(revFrom, revTo, new OutputStreamWriter(outputStream, Charset.defaultCharset())); }
/** {@inheritDoc} */ public void commit(String message, PersonIdent author, PersonIdent committer) throws GitException, InterruptedException { setAuthor(author); setCommitter(committer); commit(message); }
/** {@inheritDoc} */ public void checkout(String commit) throws GitException, InterruptedException { checkout().ref(commit).execute(); }
/** {@inheritDoc} */ public <T> T withRepository(RepositoryCallback<T> callable) throws IOException, InterruptedException { try (Repository repo = getRepository()) { return callable.invoke(repo, FilePath.localChannel); } }
/** {@inheritDoc} */ public void setAuthor(PersonIdent p) { if (p!=null) setAuthor(p.getName(),p.getEmailAddress()); }
/** * When sent to remote, switch to the proxy. * * @return a {@link java.lang.Object} object. * @throws java.io.ObjectStreamException if current channel is null */ protected Object writeReplace() throws java.io.ObjectStreamException { Channel currentChannel = Channel.current(); if (currentChannel == null) throw new java.io.WriteAbortedException("No current channel", new java.lang.NullPointerException()); return remoteProxyFor(currentChannel.export(GitClient.class, this)); }
/** {@inheritDoc} */ public void merge(ObjectId rev) throws GitException, InterruptedException { merge().setRevisionToMerge(rev).execute(); }
/** {@inheritDoc} */ public void clone(String url, String origin, boolean useShallowClone, String reference) throws GitException, InterruptedException { CloneCommand c = clone_().url(url).repositoryName(origin).reference(reference); if (useShallowClone) c.shallow(); c.execute(); }
/** {@inheritDoc} */ public void checkout(String ref, String branch) throws GitException, InterruptedException { checkout().ref(ref).branch(branch).execute(); }
/** {@inheritDoc} */ public void checkoutBranch(String branch, String ref) throws GitException, InterruptedException { checkout().ref(ref).branch(branch).deleteBranchIfExist(true).execute(); }
/** {@inheritDoc} */ public void changelog(String revFrom, String revTo, Writer w) throws GitException, InterruptedException { changelog().excludes(revFrom).includes(revTo).to(w).execute(); }