@@ -277,18 +277,9 @@ protected PasswordAuthentication getPasswordAuthentication() {
277
277
public String getRepoUrl () {
278
278
return repo .getRepoUrl ();
279
279
}
280
-
281
- @ Override
282
- public String getFileContentFromBranch (String branchName , String filePath ) throws EVCSFileNotFound {
283
- return getFileContent (branchName , filePath , null );
284
- }
285
-
280
+
286
281
@ Override
287
- public String getFileContentFromRevision (String revision , String filePath ) throws EVCSFileNotFound {
288
- return getFileContent (null , filePath , revision );
289
- }
290
-
291
- private String getFileContent (String branchName , String fileRelativePath , String revision ) {
282
+ public String getFileContent (String branchName , String fileRelativePath , String revision ) {
292
283
try (IVCSLockedWorkingCopy wc = repo .getVCSLockedWorkingCopy ();
293
284
Git git = getLocalGit (wc );
294
285
Repository gitRepo = git .getRepository ();
@@ -318,7 +309,7 @@ private String getFileContent(String branchName, String fileRelativePath, String
318
309
treeWalk .setRecursive (true );
319
310
treeWalk .setFilter (PathFilter .create (fileRelativePath ));
320
311
if (!treeWalk .next ()) {
321
- throw new EVCSFileNotFound (getRepoUrl (), fileRelativePath , revisionCommitId . getName () );
312
+ throw new EVCSFileNotFound (getRepoUrl (), getRealBranchName ( branchName ), fileRelativePath , revision );
322
313
}
323
314
ObjectId objectId = treeWalk .getObjectId (0 );
324
315
0 commit comments