Merge branch 'master' into stable-2.11
Note that in 2.11, EventListener does not return refs/heads with all
branch names; as a result, isRelevantRef() has been modified to not
match on refs/heads or refs/tags.
* master:
Add documentation updates
Add details from original tag
Add ability to back up as tag
Correct backup of tags
Switch to EventListener
Add configuration for backup branch names
Add configuration for levels of protection
Fix MissingObjectException when checking for non-ff update
Refactor backup creation to BackupRef
Change-Id: I9df9a60870c433730c6ae2f946688c8d902e0221
diff --git a/src/main/java/com/googlesource/gerrit/plugins/refprotection/RefUpdateListener.java b/src/main/java/com/googlesource/gerrit/plugins/refprotection/RefUpdateListener.java
index 0ca08f4..f79e317 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/refprotection/RefUpdateListener.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/refprotection/RefUpdateListener.java
@@ -105,9 +105,7 @@
* @return True if relevant, otherwise False.
*/
private boolean isRelevantRef(RefUpdatedEvent event) {
- return (!isNewRef(event)) &&
- (event.getRefName().startsWith(R_HEADS)
- || event.getRefName().startsWith(R_TAGS));
+ return !isNewRef(event);
}
/**