public class RefUpdateUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteChecked(org.eclipse.jgit.lib.Repository repo,
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 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.IOException - if any result was not OK.public static void executeChecked(org.eclipse.jgit.lib.BatchRefUpdate bru,
org.eclipse.jgit.revwalk.RevWalk rw)
throws 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.IOException - if any result was not OK.public static void deleteChecked(org.eclipse.jgit.lib.Repository repo,
String refName)
throws 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.IOException - if an error occurred.