summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2015-07-15 10:18:01 -0700
committerDave Borowitz <dborowitz@google.com>2015-07-15 18:09:42 -0700
commitd7377877e0371b6806b49a7ebd4a42ad448a3ad4 (patch)
treee608d400ceb3127a8d7c5103bb94b127f16f9965 /org.eclipse.jgit
parent5706c8e38e501bb1f9721167ca6cbcc169df8b10 (diff)
downloadjgit-d7377877e0371b6806b49a7ebd4a42ad448a3ad4.tar.gz
jgit-d7377877e0371b6806b49a7ebd4a42ad448a3ad4.zip
PushCertificateStore: Return boolean from batch save methods
Change-Id: I9730cb4f60c60ee6d5a7a156a0b6a53f79309ec3
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
index 9b524def66..389bd689ce 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
@@ -394,17 +394,19 @@ public class PushCertificateStore implements AutoCloseable {
*
* @param batch
* update to save to.
+ * @return whether a command was added to the batch.
* @throws IOException
* if there was an error reading from or writing to the
* repository.
*/
- public void save(BatchRefUpdate batch) throws IOException {
+ public boolean save(BatchRefUpdate batch) throws IOException {
ObjectId newId = write();
if (newId == null) {
- return;
+ return false;
}
batch.addCommand(new ReceiveCommand(
commit != null ? commit : ObjectId.zeroId(), newId, REF_NAME));
+ return true;
}
/**