Skip to content

Commit 295e2f2

Browse files
author
TheSnoozer
committed
include the configured dotGitDirectory in exception messages
1 parent a568701 commit 295e2f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/pl/project13/core/JGitProvider.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ public void prepareGitToExtractMoreDetailedRepoInformation() throws GitCommitIdE
8989
ObjectId evaluateOnCommitResolvedObjectId = git.resolve(evaluateOnCommit);
9090

9191
if ((evaluateOnCommitReference == null) && (evaluateOnCommitResolvedObjectId == null)) {
92-
throw new GitCommitIdExecutionException("Could not get " + evaluateOnCommit + " Ref, are you sure you have set the dotGitDirectory property of this plugin to a valid path?");
92+
throw new GitCommitIdExecutionException(
93+
"Could not get " + evaluateOnCommit + " Ref, are you sure you have set the dotGitDirectory " +
94+
"property of this plugin to a valid path (currently set to " + dotGitDirectory + ")?");
9395
}
9496
revWalk = new RevWalk(git);
9597
ObjectId headObjectId;
@@ -100,7 +102,9 @@ public void prepareGitToExtractMoreDetailedRepoInformation() throws GitCommitIdE
100102
}
101103

102104
if (headObjectId == null) {
103-
throw new GitCommitIdExecutionException("Could not get " + evaluateOnCommit + " Ref, are you sure you have some commits in the dotGitDirectory?");
105+
throw new GitCommitIdExecutionException(
106+
"Could not get " + evaluateOnCommit + " Ref, are you sure you have some " +
107+
"commits in the dotGitDirectory (currently set to " + dotGitDirectory + ")?");
104108
}
105109
evalCommit = revWalk.parseCommit(headObjectId);
106110
revWalk.markStart(evalCommit);

0 commit comments

Comments
 (0)