]> source.dussan.org Git - jgit.git/commit
PushCertificateStore: Don't add no-op command to batch 28/55128/2
authorDave Borowitz <dborowitz@google.com>
Wed, 2 Sep 2015 19:04:33 +0000 (15:04 -0400)
committerDave Borowitz <dborowitz@google.com>
Wed, 2 Sep 2015 19:17:10 +0000 (15:17 -0400)
commit45e9e28ad9daad3c64a16685bd9c07ed18d2ab50
tree48ec2c694b29954f41d969d028154ef24d0c493e
parent4a11534c25a17df3acb185ce701e921cca688b4b
PushCertificateStore: Don't add no-op command to batch

If no refs match the input list and we are writing to a batch,
the returned new commit from write() will match the current commit.
Adding a command to the batch for this case is harmless as it will
succeed, but it's more straightforward to just skip adding a command
in this case.

Add tests or the combination of saving matching refs and saving to a
batch.

Change-Id: I6837389b08e6c80bc2d4c9e9c506d07293ea5fb2
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateStoreTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java