Skip to content

Commit 15bea61

Browse files
harrisricvladak
authored andcommitted
Tidy up git repo revision handling.
1 parent 2c202eb commit 15bea61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/GitRepository.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ private String getPathRelativeToCanonicalRepositoryRoot(String fullPath) throws
239239

240240
/**
241241
* Get the name of file in given revision. The returned file name is relative to the repository root.
242-
* Assumes renamed file hanndling is on.
242+
* Assumes renamed file handling is on.
243243
*
244244
* @param fullpath full file path
245-
* @param changeset revision ID (could be short)
245+
* @param changeset revision ID
246246
* @return original filename relative to the repository root
247247
* @throws java.io.IOException if I/O exception occurred
248248
* @see #getPathRelativeToCanonicalRepositoryRoot(String)
@@ -278,7 +278,7 @@ String findOriginalName(String fullpath, String changeset) throws IOException {
278278
continue;
279279
}
280280

281-
if (commit.getId().getName().startsWith(changeset)) { // suspicious? - should be an exact match on revision Id
281+
if (commit.getId().getName().equals(changeset)) {
282282
break;
283283
}
284284

0 commit comments

Comments
 (0)