mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] use case-sensitive hashing strategy when calculating diff preview revision titles
This commit is contained in:
@@ -430,7 +430,8 @@ private fun <E, R> Collection<E>.firstNotNull(mapping: (E) -> R): R? {
|
||||
return null
|
||||
}
|
||||
|
||||
internal val FILE_PATH_HASHING_STRATEGY = FilePathCaseSensitiveStrategy()
|
||||
@JvmField
|
||||
val FILE_PATH_HASHING_STRATEGY: TObjectHashingStrategy<FilePath> = FilePathCaseSensitiveStrategy()
|
||||
|
||||
internal class FilePathCaseSensitiveStrategy : TObjectHashingStrategy<FilePath> {
|
||||
override fun equals(path1: FilePath?, path2: FilePath?): Boolean {
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.intellij.vcs.log.VcsFullCommitDetails;
|
||||
import com.intellij.vcs.log.VcsShortCommitDetails;
|
||||
import com.intellij.vcs.log.data.LoadingDetails;
|
||||
import com.intellij.vcs.log.data.index.IndexedDetails;
|
||||
import com.intellij.vcs.log.history.FileHistoryKt;
|
||||
import com.intellij.vcs.log.impl.MainVcsLogUiProperties;
|
||||
import com.intellij.vcs.log.impl.MergedChange;
|
||||
import com.intellij.vcs.log.impl.MergedChangeDiffRequestProvider;
|
||||
@@ -331,7 +332,9 @@ public class VcsLogChangesBrowser extends ChangesBrowserBase implements Disposab
|
||||
@Nullable FilePath file,
|
||||
@Nullable FilePath baseFile) {
|
||||
return getShortHash(revision) +
|
||||
(file == null || Objects.equals(baseFile, file) ? "" : " (" + getRelativeFileName(baseFile, file) + ")");
|
||||
(file == null || FileHistoryKt.FILE_PATH_HASHING_STRATEGY.equals(baseFile, file)
|
||||
? ""
|
||||
: " (" + getRelativeFileName(baseFile, file) + ")");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user