1
2
3
4
5
6
7
8
9
10
11 package org.eclipse.jgit.internal.storage.file;
12
13 import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
14 import org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation;
15 import org.eclipse.jgit.lib.AnyObjectId;
16
17
18 class LocalObjectToPack extends ObjectToPack {
19
20 PackFile pack;
21
22
23 long offset;
24
25
26 long length;
27
28 LocalObjectToPack(AnyObjectId src, int type) {
29 super(src, type);
30 }
31
32
33 @Override
34 protected void clearReuseAsIs() {
35 super.clearReuseAsIs();
36 pack = null;
37 }
38
39
40 @Override
41 public void select(StoredObjectRepresentation ref) {
42 LocalObjectRepresentation ptr = (LocalObjectRepresentation) ref;
43 this.pack = ptr.pack;
44 this.offset = ptr.offset;
45 this.length = ptr.length;
46 }
47 }