List of usage examples for org.eclipse.jgit.diff DiffConfig KEY
Config.SectionParser KEY
To view the source code for org.eclipse.jgit.diff DiffConfig KEY.
Click Source Link
From source file:MyDiffFormatter.java
License:Eclipse Distribution License
/** * Set the repository the formatter can load object contents from. * <p/>// ww w . jav a 2 s . c o m * Once a repository has been set, the formatter must be released to ensure * the internal ObjectReader is able to release its resources. * * @param repository source repository holding referenced objects. */ public void setRepository(Repository repository) { if (reader != null) reader.release(); db = repository; reader = db.newObjectReader(); diffCfg = db.getConfig().get(DiffConfig.KEY); ContentSource cs = ContentSource.create(reader); source = new ContentSource.Pair(cs, cs); DiffConfig dc = db.getConfig().get(DiffConfig.KEY); if (dc.isNoPrefix()) { setOldPrefix(""); //$NON-NLS-1$ setNewPrefix(""); //$NON-NLS-1$ } setDetectRenames(dc.isRenameDetectionEnabled()); diffAlgorithm = DiffAlgorithm.getAlgorithm(db.getConfig().getEnum(ConfigConstants.CONFIG_DIFF_SECTION, null, ConfigConstants.CONFIG_KEY_ALGORITHM, SupportedAlgorithm.HISTOGRAM)); }