James Moger
2013-05-31 8d850b648b6e6a72b47d71b1a022cd4211eb88b5
src/main/java/com/gitblit/AddIndexedBranch.java
@@ -25,9 +25,8 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.internal.storage.file.FileRepository;
import org.eclipse.jgit.util.FS;
import com.beust.jcommander.JCommander;
@@ -88,12 +87,12 @@
         try {
            // load repository config
            File gitDir = FileKey.resolve(new File(folder, repo), FS.DETECTED);
            FileRepository repository = (FileRepository)new FileRepositoryBuilder().setGitDir(gitDir).build();
            FileBasedConfig config = repository.getConfig();
            Repository repository = new FileRepositoryBuilder().setGitDir(gitDir).build();
            StoredConfig config = repository.getConfig();
            config.load();
            
            Set<String> indexedBranches = new LinkedHashSet<String>();
            indexedBranches.add(Constants.DEFAULT_BRANCH);
            indexedBranches.add(params.branch);
            
            String [] branches = config.getStringList("gitblit", null, "indexBranch");
            if (!ArrayUtils.isEmpty(branches)) {