Browse Source

BatchRefUpdate: Expand javadocs and add @Nullable

Change-Id: I22d739a9677e24f36323dceadf7d375ac2f446e8
stable-4.9
Dave Borowitz 7 years ago
parent
commit
a1e11461cc
  1. 23
      org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

23
org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

@ -177,11 +177,17 @@ public class BatchRefUpdate {
* @return message the caller wants to include in the reflog; null if the
* update should not be logged.
*/
@Nullable
public String getRefLogMessage() {
return refLogMessage;
}
/** @return {@code true} if the ref log message should show the result. */
/**
* Check whether the reflog message should include the result of the update,
* such as fast-forward or force-update.
*
* @return true if the message should include the result.
*/
public boolean isRefLogIncludingResult() {
return refLogIncludeResult;
}
@ -190,12 +196,11 @@ public class BatchRefUpdate {
* Set the message to include in the reflog.
*
* @param msg
* the message to describe this change. It may be null if
* appendStatus is null in order not to append to the reflog
* the message to describe this change. If null and appendStatus is
* false, the reflog will not be updated.
* @param appendStatus
* true if the status of the ref change (fast-forward or
* forced-update) should be appended to the user supplied
* message.
* forced-update) should be appended to the user supplied message.
* @return {@code this}.
*/
public BatchRefUpdate setRefLogMessage(String msg, boolean appendStatus) {
@ -213,6 +218,8 @@ public class BatchRefUpdate {
/**
* Don't record this update in the ref's associated reflog.
* <p>
* Equivalent to {@code setRefLogMessage(null, false)}.
*
* @return {@code this}.
*/
@ -222,7 +229,11 @@ public class BatchRefUpdate {
return this;
}
/** @return true if log has been disabled by {@link #disableRefLog()}. */
/**
* Check whether log has been disabled by {@link #disableRefLog()}.
*
* @return true if disabled.
*/
public boolean isRefLogDisabled() {
return refLogMessage == null;
}

Loading…
Cancel
Save