From d7493249a18f793d583ac234387f939d07aab019 Mon Sep 17 00:00:00 2001 From: Arjan Molenaar Date: Mon, 18 Jan 2016 22:21:00 +0100 Subject: [PATCH] Fix property names, no quotes needed. --- gradle.properties | 4 ++-- src/fitnesse/wiki/fs/GitFileVersionsController.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index a80aada..91a92d9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ version=1.0.1 -group = "org.fitnesse.plugins" -archivesBaseName = "fitnesse-git-plugin" +group = org.fitnesse.plugins +archivesBaseName = fitnesse-git-plugin diff --git a/src/fitnesse/wiki/fs/GitFileVersionsController.java b/src/fitnesse/wiki/fs/GitFileVersionsController.java index 4365833..22c80a4 100644 --- a/src/fitnesse/wiki/fs/GitFileVersionsController.java +++ b/src/fitnesse/wiki/fs/GitFileVersionsController.java @@ -101,7 +101,11 @@ public Collection history(final File... files) { return history(files[0], new LogCommandSpec() { public LogCommand specify(LogCommand log, Repository repository) { for (File file : files) { - log.addPath(getPath(file, repository)); + try { + log.addPath(getPath(file, repository)); + } catch (IOException e) { + throw new RuntimeException(e); + } } return log.setMaxCount(historyDepth); } @@ -191,9 +195,9 @@ private void commit(Git git, String message, String author) throws GitAPIExcepti } // Paths we feed to Git should be relative to the git repo. Absolute paths are not appreciated. - private String getPath(File file, Repository repository) { - String workTreePath = repository.getWorkTree().getAbsolutePath(); - String pagePath = file.getAbsolutePath(); + private String getPath(File file, Repository repository) throws IOException { + String workTreePath = repository.getWorkTree().getCanonicalPath(); + String pagePath = file.getCanonicalPath(); assert pagePath.startsWith(workTreePath);