summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2015-10-28 13:25:09 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2015-11-27 23:23:09 +0100
commit5d9f595eb87fba31c2253051102116fc7876e6c0 (patch)
tree3c20ebe72c89617a7c575612f46699d18ca40833 /org.eclipse.jgit.junit
parent75697adc5a0024449351aacac89618c3b83add11 (diff)
downloadjgit-5d9f595eb87fba31c2253051102116fc7876e6c0.tar.gz
jgit-5d9f595eb87fba31c2253051102116fc7876e6c0.zip
Add support for clean filters
When filters are defined for certain paths in gitattributes make sure that clean filters are processed when adding new content to the object database. Change-Id: Iffd72914cec5b434ba4d0de232e285b7492db868 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
index 56962e869f..c649eb9086 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
@@ -283,6 +283,19 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
}
/**
+ * Replaces '\' by '/'
+ *
+ * @param str
+ * the string in which backslashes should be replaced
+ * @return the resulting string with slashes
+ * @since 4.2
+ */
+ public static String slashify(String str) {
+ str = str.replace('\\', '/');
+ return str;
+ }
+
+ /**
* Waits until it is guaranteed that a subsequent file modification has a
* younger modification timestamp than the modification timestamp of the
* given file. This is done by touching a temporary file, reading the