]> source.dussan.org Git - jgit.git/commitdiff
BatchRefUpdate: Expand javadocs and add @Nullable 83/101583/3
authorDave Borowitz <dborowitz@google.com>
Wed, 19 Jul 2017 17:55:16 +0000 (13:55 -0400)
committerDave Borowitz <dborowitz@google.com>
Wed, 26 Jul 2017 15:39:39 +0000 (11:39 -0400)
Change-Id: I22d739a9677e24f36323dceadf7d375ac2f446e8

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

index aa85cc7b29a17a5e1aa30913e23e3ae5314bda24..4f1299a6cbd1971ee3cee20bb34e07d33f719544 100644 (file)
@@ -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;
        }