Skip to content

Commit

Permalink
Remove path separator check
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Rademacher authored and adamdubiel committed Jan 26, 2020
1 parent 1cc1d3e commit 96563f4
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ public void commit(List<String> patterns, String message) {

@Override
public ScmPosition positionOfLastChangeIn(String path, List<String> excludeSubFolders) {
assertPathFormat(path);
RevCommit lastCommit;

// if the path is empty ('') then it means we are at the root of the Git directory
Expand All @@ -221,7 +220,6 @@ public ScmPosition positionOfLastChangeIn(String path, List<String> excludeSubFo
if (path.isEmpty()) {
LogCommand logCommand = jgitRepository.log().setMaxCount(1);
for (String excludedPath : excludeSubFolders) {
assertPathFormat(excludedPath);
logCommand.excludePath(excludedPath);
}
lastCommit = logCommand.call().iterator().next();
Expand Down Expand Up @@ -250,12 +248,6 @@ public ScmPosition positionOfLastChangeIn(String path, List<String> excludeSubFo
}
}

private void assertPathFormat(String path) {
if (path.contains("\\")) {
throw new ScmException("Only slashes are supported in path ('" + path + "')");
}
}

private void assertPathExists(String path) {
File subpath = new File(repositoryDir, path);
if (!subpath.exists()) {
Expand Down

0 comments on commit 96563f4

Please sign in to comment.