Add documentation updates Document the new configuration options, and change the URL to the public-facing url on gerrit.googlesource.com Change-Id: I99f8e3a139e7b57c95564e4d920ac79150379e2c
diff --git a/BUCK b/BUCK index 3351729..367d677 100644 --- a/BUCK +++ b/BUCK
@@ -4,7 +4,7 @@ resources = glob(['src/main/resources/**/*']), manifest_entries = [ 'Implementation-Title: Ref Protection plugin', - 'Implementation-URL: http://review-plus.sonyericsson.net/#/admin/projects/gerrit/plugins/ref-protection', + 'Implementation-URL: http://gerrit.googlesource.com/plugins/ref-protection', 'Gerrit-PluginName: ref-protection', 'Gerrit-Module: com.googlesource.gerrit.plugins.refprotection.RefProtectionModule' ],
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md index c681000..4d2d541 100644 --- a/src/main/resources/Documentation/about.md +++ b/src/main/resources/Documentation/about.md
@@ -1,10 +1,24 @@ Ref protection plugin. -Protects against commits being lost by creating backups of deleted refs under -the `refs/backups/` namespace. +Protects against commits being lost by creating backups of deleted refs +(or non-fast-forward commits) under the `refs/backups/` namespace. + +Branch deletion protection can be disabled by setting +`plugin.ref-protection.protectDeleted false` in `gerrit.config`. +Similarly, non-fast-forward update protection can be disabled with +`plugin.ref-protection.protectFastForward false`. Branches under `refs/heads/` that are deleted or rewritten are backed up -as `refs/backups/heads/branch-name-YYYYMMDD-HHmmss`. +as `refs/backups/heads/branch-name-YYYYMMDD-HHmmss` by default, or as +sequentially increasing numbers under `refs/backups/heads/branch-name/#` +by setting `plugin.ref-protection.useTimestamp false`. Tags under `refs/tags/` that are deleted are backed up (as branches) as -`refs/backups/tags/tag-name-YYYYMMDD-HHmmss`. +`refs/backups/tags/tag-name-YYYYMMDD-HHmmss` or as sequentially +increasing numbers under `refs/backups/tags/branch-name/#` using the same +`plugin.ref-protection.useTimestamp` setting. + +By default, the backups are created as branches. Optionally, they may +be created as tags, containing information about the original ref that +was changed, as well as the user that performed the change. This can +be enabled by setting `plugin.ref-protection.createTag true`.