/** * Get merge configuration for the current branch of the repository * * @param repo * a {@link org.eclipse.jgit.lib.Repository} object. * @return merge configuration for the current branch of the repository */ public static MergeConfig getConfigForCurrentBranch(Repository repo) { try { String branch = repo.getBranch(); if (branch != null) return repo.getConfig().get(getParser(branch)); } catch (IOException e) { // ignore } // use defaults if branch can't be determined return new MergeConfig(); }
/** * @param repo * @return merge configuration for the current branch of the repository */ public static MergeConfig getConfigForCurrentBranch(Repository repo) { try { String branch = repo.getBranch(); if (branch != null) return repo.getConfig().get(getParser(branch)); } catch (IOException e) { // ignore } // use defaults if branch can't be determined return new MergeConfig(); }
/** * Get merge configuration for the current branch of the repository * * @param repo * a {@link org.eclipse.jgit.lib.Repository} object. * @return merge configuration for the current branch of the repository */ public static MergeConfig getConfigForCurrentBranch(Repository repo) { try { String branch = repo.getBranch(); if (branch != null) return repo.getConfig().get(getParser(branch)); } catch (IOException e) { // ignore } // use defaults if branch can't be determined return new MergeConfig(); }