]> source.dussan.org Git - gitblit.git/commitdiff
Update indexed branches on federation pull
authorJames Moger <james.moger@gitblit.com>
Fri, 23 Mar 2012 20:35:48 +0000 (16:35 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 23 Mar 2012 20:35:48 +0000 (16:35 -0400)
src/com/gitblit/FederationPullExecutor.java

index 0fd1355fbedbefd88063a696b25a25a9ac139776..10f69d2fce88073606eb289745c07073895e64d0 100644 (file)
@@ -272,6 +272,17 @@ public class FederationPullExecutor implements Runnable {
                                        federationSets.addAll(repository.federationSets);\r
                                }\r
                                repository.federationSets = new ArrayList<String>(federationSets);\r
+                               \r
+                               // merge indexed branches\r
+                               Set<String> indexedBranches = new HashSet<String>();\r
+                               if (rm.indexedBranches != null) {\r
+                                       indexedBranches.addAll(rm.indexedBranches);\r
+                               }\r
+                               if (repository.indexedBranches != null) {\r
+                                       indexedBranches.addAll(repository.indexedBranches);\r
+                               }\r
+                               repository.indexedBranches = new ArrayList<String>(indexedBranches);\r
+\r
                        }\r
                        // only repositories that are actually _cloned_ from the origin\r
                        // Gitblit repository are marked as federated. If the origin\r