[git] rename collectShortDetails to collectMetadata

This commit is contained in:
Julia Beliaeva
2019-03-25 21:33:08 +03:00
parent c77871a5a5
commit d97bf8a17e
4 changed files with 7 additions and 9 deletions
@@ -112,8 +112,8 @@ public class GitHistoryUtils {
@NotNull VirtualFile root,
@NotNull String... hashes)
throws VcsException {
List<? extends VcsCommitMetadata> result = GitLogUtil.collectShortDetails(project, GitVcs.getInstance(project), root,
Arrays.asList(hashes));
List<? extends VcsCommitMetadata> result = GitLogUtil.collectMetadata(project, GitVcs.getInstance(project), root,
Arrays.asList(hashes));
if (result.size() != hashes.length) return null;
return result;
}
@@ -49,10 +49,8 @@ public class GitLogUtil {
public static final String STDIN = "--stdin";
@NotNull
public static List<? extends VcsCommitMetadata> collectShortDetails(@NotNull Project project,
@NotNull GitVcs vcs,
@NotNull VirtualFile root,
@NotNull List<String> hashes)
public static List<? extends VcsCommitMetadata> collectMetadata(@NotNull Project project, @NotNull GitVcs vcs, @NotNull VirtualFile root,
@NotNull List<String> hashes)
throws VcsException {
VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project);
if (factory == null) {
@@ -355,7 +355,7 @@ public class GitLogProvider implements VcsLogProvider {
@Override
public List<? extends VcsCommitMetadata> readMetadata(@NotNull final VirtualFile root, @NotNull List<String> hashes)
throws VcsException {
return GitLogUtil.collectShortDetails(myProject, myVcs, root, hashes);
return GitLogUtil.collectMetadata(myProject, myVcs, root, hashes);
}
@NotNull
@@ -105,8 +105,8 @@ open class GitDefaultMergeDialogCustomizer(
private fun loadCherryPickCommitDetails(repository: GitRepository): CherryPickDetails? {
val cherryPickHead = tryResolveRef(repository, CHERRY_PICK_HEAD) ?: return null
val shortDetails = GitLogUtil.collectShortDetails(project, GitVcs.getInstance(project), repository.root,
listOf(cherryPickHead.asString()))
val shortDetails = GitLogUtil.collectMetadata(project, GitVcs.getInstance(project), repository.root,
listOf(cherryPickHead.asString()))
val result = shortDetails.singleOrNull() ?: return null
return CherryPickDetails(cherryPickHead.toShortString(), result.author.name, result.subject)