Revert "Stop using deprecated DirCacheEntry#setLastModified(long)"
This reverts commit cba560d1fc.
Reason for revert: The Jgit upgrade that made it necessary is
being reverted.
Bug: Issue 11373
Change-Id: I372023a611cfe02adc38827ceb6a66b5f9a67ce0
This commit is contained in:
committed by
Luca Milanesio
parent
49de8d7355
commit
dd382e8ac9
@@ -23,7 +23,6 @@ import com.google.common.io.ByteStreams;
|
|||||||
import com.google.gerrit.extensions.restapi.RawInput;
|
import com.google.gerrit.extensions.restapi.RawInput;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.eclipse.jgit.dircache.DirCacheEditor;
|
import org.eclipse.jgit.dircache.DirCacheEditor;
|
||||||
@@ -80,7 +79,7 @@ public class ChangeFileContentModification implements TreeModification {
|
|||||||
try {
|
try {
|
||||||
if (dirCacheEntry.getFileMode() == FileMode.GITLINK) {
|
if (dirCacheEntry.getFileMode() == FileMode.GITLINK) {
|
||||||
dirCacheEntry.setLength(0);
|
dirCacheEntry.setLength(0);
|
||||||
dirCacheEntry.setLastModified(Instant.ofEpochMilli(0));
|
dirCacheEntry.setLastModified(0);
|
||||||
ObjectId newObjectId = ObjectId.fromString(getNewContentBytes(), 0);
|
ObjectId newObjectId = ObjectId.fromString(getNewContentBytes(), 0);
|
||||||
dirCacheEntry.setObjectId(newObjectId);
|
dirCacheEntry.setObjectId(newObjectId);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user