Merge branch 'stable-2.3' into stable-2.4
* stable-2.3: (27 commits)
Fix merging of access sections
Fix: Inconsistent behaviour when replicating refs/meta/config
Fix case check for project name so that symlinks work again
Move note about changing approval categories to the correct section
Fix spelling mistake in access control documentation
Gerrit 2.3 ReleaseNotes
Fix link in show caches documentation
Access control documentation: Administrator example role
Access control documentation: Project owner example role
Access control documentation: Integrator example role
Access control documentation: CI system example role
Access control documentation: Capability view conn. & queue
Access control documentation: Developer example role
Access control documentation: Capability replication and view caches
Access control documentation: Kill and priority capabilities
Access control documentation: Flush caches capability
Access control documentation: Example roles introduced
Add missing header for suggest.accounts documentation
Add visible-to-all flag in the documentation for cmd-create-group
Access control documentation: Create group and project
...
Conflicts:
Documentation/config-gerrit.txt
ReleaseNotes/index.txt
gerrit-server/src/main/java/com/google/gerrit/server/git/RepositoryCaseMismatchException.java
Change-Id: I23398003827ee9c010445e65e6d16b55f2754f3d
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
index 04f0ecd..cd64b0a 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
@@ -97,7 +97,7 @@
if (dst != null) {
dst.mergeFrom(src);
} else {
- permissions.add(dst);
+ permissions.add(src);
}
}
}
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/PushOp.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/PushOp.java
index 5c6cd25..0868749 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/git/PushOp.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/PushOp.java
@@ -343,10 +343,6 @@
if (config.isMirror()) {
for (final Ref ref : remote.values()) {
- if (noPerms && GitRepositoryManager.REF_CONFIG.equals(ref.getName())) {
- continue;
- }
-
if (!Constants.HEAD.equals(ref.getName())) {
final RefSpec spec = matchDst(ref.getName());
if (spec != null && !local.containsKey(spec.getSource())) {
@@ -360,16 +356,13 @@
} else {
for (final String src : delta) {
- if (noPerms && GitRepositoryManager.REF_CONFIG.equals(src)) {
- continue;
- }
-
final RefSpec spec = matchSrc(src);
if (spec != null) {
// If the ref still exists locally, send it, otherwise delete it.
//
Ref srcRef = local.get(src);
- if (srcRef != null) {
+ if (srcRef != null &&
+ !(noPerms && GitRepositoryManager.REF_CONFIG.equals(src))) {
send(cmds, spec, srcRef);
} else if (config.isMirror()) {
delete(cmds, spec);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/util/MagicBranch.java b/gerrit-server/src/main/java/com/google/gerrit/server/util/MagicBranch.java
index ef72f92..510deaa02 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/util/MagicBranch.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/util/MagicBranch.java
@@ -108,4 +108,4 @@
private MagicBranch() {
}
-}
\ No newline at end of file
+}