*/
public static final String CONFIG_PULL_SECTION = "pull";
+ /**
+ * The "filter" section
+ * @since 4.6
+ */
+ public static final String CONFIG_FILTER_SECTION = "filter";
+
/** The "algorithm" key */
public static final String CONFIG_KEY_ALGORITHM = "algorithm";
* @since 4.0
*/
public static final String CONFIG_KEY_STREAM_RATIO = "streamRatio";
+
+ /**
+ * Flag in the filter section whether to use JGit's implementations of
+ * filters and hooks
+ * @since 4.6
+ */
+ public static final String CONFIG_KEY_USEJGITBUILTIN = "useJGitBuiltin";
}
*/
public static final String ATTR_FILTER_TYPE_SMUDGE = "smudge";
- /**
- * Whether to use JGit's implementations of filters and hooks
- *
- * @since 4.6
- */
- public static final String ATTR_FILTER_USE_BUILTIN = "useJGitBuiltin";
-
/**
* Builtin filter commands start with this prefix
*
import org.eclipse.jgit.errors.StopWalkException;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.CoreConfig.EolStreamType;
import org.eclipse.jgit.lib.FileMode;
String filterCommand = filterCommandsByNameDotType.get(key);
if (filterCommand != null)
return filterCommand;
- filterCommand = config.getString(Constants.ATTR_FILTER,
+ filterCommand = config.getString(ConfigConstants.CONFIG_FILTER_SECTION,
filterDriverName, filterCommandType);
- boolean useBuiltin = config.getBoolean(Constants.ATTR_FILTER,
- filterDriverName, Constants.ATTR_FILTER_USE_BUILTIN, false);
+ boolean useBuiltin = config.getBoolean(
+ ConfigConstants.CONFIG_FILTER_SECTION,
+ filterDriverName, ConfigConstants.CONFIG_KEY_USEJGITBUILTIN, false);
if (useBuiltin) {
String builtinFilterCommand = Constants.BUILTIN_FILTER_PREFIX
+ filterDriverName + '/' + filterCommandType;