mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-31 20:59:47 +01:00
Add 'partial' flag to files
This commit is contained in:
@@ -210,6 +210,7 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
// don't show message and date for directories to improve performance
|
||||
if (!file.isDirectory() &&!request.isDisableLastCommit())
|
||||
{
|
||||
file.setPartialResult(true);
|
||||
executor.execute(executionType -> {
|
||||
logger.trace("fetch last commit for {} at {}", path, revId.getName());
|
||||
RevCommit commit = getLatestCommit(repo, revId, path);
|
||||
@@ -235,6 +236,7 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
file.setLength(loader.getSize());
|
||||
}
|
||||
|
||||
file.setPartialResult(false);
|
||||
if (commit != null) {
|
||||
file.setLastModified(GitUtil.getCommitTime(commit));
|
||||
file.setDescription(commit.getShortMessage());
|
||||
|
||||
Reference in New Issue
Block a user