public class RefUpdateUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
deleteChecked(org.eclipse.jgit.lib.Repository repo,
java.lang.String refName)
Delete a single ref, throwing a checked exception on failure.
|
static void |
executeChecked(org.eclipse.jgit.lib.BatchRefUpdate bru,
org.eclipse.jgit.lib.Repository repo)
Execute a batch ref update, throwing a checked exception if not all updates succeeded.
|
static void |
executeChecked(org.eclipse.jgit.lib.BatchRefUpdate bru,
org.eclipse.jgit.revwalk.RevWalk rw)
Execute a batch ref update, throwing a checked exception if not all updates succeeded.
|
public static void executeChecked(org.eclipse.jgit.lib.BatchRefUpdate bru, org.eclipse.jgit.lib.Repository repo) throws java.io.IOException
Creates a new RevWalk
used only for this operation.
bru
- batch update; should already have been executed.repo
- repository that created bru
.LockFailureException
- if the transaction was aborted due to lock failure; see checkResults(BatchRefUpdate)
for details.java.io.IOException
- if any result was not OK
.public static void executeChecked(org.eclipse.jgit.lib.BatchRefUpdate bru, org.eclipse.jgit.revwalk.RevWalk rw) throws java.io.IOException
bru
- batch update; should already have been executed.rw
- walk for executing the update.LockFailureException
- if the transaction was aborted due to lock failure; see checkResults(BatchRefUpdate)
for details.java.io.IOException
- if any result was not OK
.public static void deleteChecked(org.eclipse.jgit.lib.Repository repo, java.lang.String refName) throws java.io.IOException
Does not require that the ref have any particular old value. Succeeds as a no-op if the ref did not exist.
repo
- repository.refName
- ref name to delete.LockFailureException
- if a low-level lock failure (e.g. compare-and-swap failure)
occurs.java.io.IOException
- if an error occurred.