Make partial file attributes explicit.

This commit is contained in:
Rene Pfeuffer
2019-12-18 11:48:17 +01:00
parent 0d6dcbd6bd
commit cf9d1edb70
16 changed files with 190 additions and 103 deletions

View File

@@ -345,7 +345,7 @@ public class GitBrowseCommand extends AbstractGitCommand
Blob blob = lfsBlobStore.get(oid);
if (blob == null) {
logger.error("lfs blob for lob id {} not found in lfs store of repository {}", oid, repository.getNamespaceAndName());
file.setLength(-1);
file.setLength(null);
} else {
file.setLength(blob.getSize());
}
@@ -402,7 +402,7 @@ public class GitBrowseCommand extends AbstractGitCommand
}
private void applyValuesFromCommit(SyncAsyncExecutor.ExecutionType executionType, RevCommit commit) {
file.setLastModified(GitUtil.getCommitTime(commit));
file.setCommitDate(GitUtil.getCommitTime(commit));
file.setDescription(commit.getShortMessage());
if (executionType == ASYNCHRONOUS && browserResult != null) {
updateCache(request);