Enum RefUpdate.Result
- java.lang.Object
-
- java.lang.Enum<RefUpdate.Result>
-
- org.eclipse.jgit.lib.RefUpdate.Result
-
- All Implemented Interfaces:
Serializable
,Comparable<RefUpdate.Result>
- Enclosing class:
- RefUpdate
public static enum RefUpdate.Result extends Enum<RefUpdate.Result>
Status of an update request.New values may be added to this enum in the future. Callers may assume that unknown values are failures, and may generally treat them the same as
REJECTED_OTHER_REASON
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAST_FORWARD
The ref was updated/deleted in a fast-forward way.FORCED
The ref had to be forcefully updated/deleted.IO_FAILURE
The ref was probably not updated/deleted because of I/O error.LOCK_FAILURE
The ref could not be locked for update/delete.NEW
The ref was created locally for an update, but ignored for delete.NO_CHANGE
Same value already stored.NOT_ATTEMPTED
The ref update/delete has not been attempted by the caller.REJECTED
Not a fast-forward and not stored.REJECTED_CURRENT_BRANCH
Rejected because trying to delete the current branch.REJECTED_MISSING_OBJECT
One or more objects aren't in the repository.REJECTED_OTHER_REASON
Rejected for some other reason not covered by another enum value.RENAMED
The ref was renamed from another name
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RefUpdate.Result
valueOf(String name)
Returns the enum constant of this type with the specified name.static RefUpdate.Result[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_ATTEMPTED
public static final RefUpdate.Result NOT_ATTEMPTED
The ref update/delete has not been attempted by the caller.
-
LOCK_FAILURE
public static final RefUpdate.Result LOCK_FAILURE
The ref could not be locked for update/delete.This is generally a transient failure and is usually caused by another process trying to access the ref at the same time as this process was trying to update it. It is possible a future operation will be successful.
-
NO_CHANGE
public static final RefUpdate.Result NO_CHANGE
Same value already stored.Both the old value and the new value are identical. No change was necessary for an update. For delete the branch is removed.
-
NEW
public static final RefUpdate.Result NEW
The ref was created locally for an update, but ignored for delete.The ref did not exist when the update started, but it was created successfully with the new value.
-
FORCED
public static final RefUpdate.Result FORCED
The ref had to be forcefully updated/deleted.The ref already existed but its old value was not fully merged into the new value. The configuration permitted a forced update to take place, so ref now contains the new value. History associated with the objects not merged may no longer be reachable.
-
FAST_FORWARD
public static final RefUpdate.Result FAST_FORWARD
The ref was updated/deleted in a fast-forward way.The tracking ref already existed and its old value was fully merged into the new value. No history was made unreachable.
-
REJECTED
public static final RefUpdate.Result REJECTED
Not a fast-forward and not stored.The tracking ref already existed but its old value was not fully merged into the new value. The configuration did not allow a forced update/delete to take place, so ref still contains the old value. No previous history was lost.
Note: Despite the general name, this result only refers to the non-fast-forward case. For more general errors, see
REJECTED_OTHER_REASON
.
-
REJECTED_CURRENT_BRANCH
public static final RefUpdate.Result REJECTED_CURRENT_BRANCH
Rejected because trying to delete the current branch.Has no meaning for update.
-
IO_FAILURE
public static final RefUpdate.Result IO_FAILURE
The ref was probably not updated/deleted because of I/O error.Unexpected I/O error occurred when writing new ref. Such error may result in uncertain state, but most probably ref was not updated.
This kind of error doesn't include
LOCK_FAILURE
, which is a different case.
-
RENAMED
public static final RefUpdate.Result RENAMED
The ref was renamed from another name
-
REJECTED_MISSING_OBJECT
public static final RefUpdate.Result REJECTED_MISSING_OBJECT
One or more objects aren't in the repository.This is severe indication of either repository corruption on the server side, or a bug in the client wherein the client did not supply all required objects during the pack transfer.
- Since:
- 4.9
-
REJECTED_OTHER_REASON
public static final RefUpdate.Result REJECTED_OTHER_REASON
Rejected for some other reason not covered by another enum value.- Since:
- 4.9
-
-
Method Detail
-
values
public static RefUpdate.Result[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RefUpdate.Result c : RefUpdate.Result.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RefUpdate.Result valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-