mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] skip replaced in commit references list
Similar to grafted commits, replaced commits are marked as "replaced". Since this is not a reference, it is not included in references list. IDEA-169831, EA-99213
This commit is contained in:
@@ -83,6 +83,7 @@ public class GitUtil {
|
||||
|
||||
public static final String ORIGIN_HEAD = "origin/HEAD";
|
||||
public static final String GRAFTED = "grafted";
|
||||
public static final String REPLACED = "replaced";
|
||||
|
||||
public static final Function<GitRepository, VirtualFile> REPOSITORY_TO_ROOT = new Function<GitRepository, VirtualFile>() {
|
||||
@Override
|
||||
|
||||
@@ -612,7 +612,7 @@ public class GitHistoryUtils {
|
||||
@NotNull VcsLogObjectsFactory factory,
|
||||
@NotNull VirtualFile root) {
|
||||
return ContainerUtil.mapNotNull(refs, refName -> {
|
||||
if (refName.equals(GitUtil.GRAFTED)) return null;
|
||||
if (refName.equals(GitUtil.GRAFTED) || refName.equals(GitUtil.REPLACED)) return null;
|
||||
VcsRefType type = GitRefManager.getRefType(refName);
|
||||
refName = GitBranchUtil.stripRefsPrefix(refName);
|
||||
return refName.equals(GitUtil.ORIGIN_HEAD) ? null : factory.createRef(hash, refName, type, root);
|
||||
|
||||
Reference in New Issue
Block a user