12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- /*
- * Copyright (C) 2021, Tencent.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Distribution License v. 1.0 which is available at
- * https://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
- package org.eclipse.jgit.internal.storage.commitgraph;
-
- /**
- * Constants relating to commit-graph.
- */
- class CommitGraphConstants {
-
- static final int COMMIT_GRAPH_MAGIC = 0x43475048; /* "CGPH" */
-
- static final int CHUNK_ID_OID_FANOUT = 0x4f494446; /* "OIDF" */
-
- static final int CHUNK_ID_OID_LOOKUP = 0x4f49444c; /* "OIDL" */
-
- static final int CHUNK_ID_COMMIT_DATA = 0x43444154; /* "CDAT" */
-
- static final int CHUNK_ID_EXTRA_EDGE_LIST = 0x45444745; /* "EDGE" */
-
- static final int GRAPH_CHUNK_LOOKUP_WIDTH = 12;
-
- static final int COMMIT_DATA_EXTRA_LENGTH = 16;
-
- /** Mask to make the last edgeValue into position */
- static final int GRAPH_EDGE_LAST_MASK = 0x7fffffff;
-
- /** EdgeValue & GRAPH_LAST_EDGE != 0 means it is the last edgeValue */
- static final int GRAPH_LAST_EDGE = 0x80000000;
-
- /** EdgeValue == GRAPH_NO_PARENT means it has no parents */
- static final int GRAPH_NO_PARENT = 0x70000000;
-
- /**
- * EdgeValue & GRAPH_EXTRA_EDGES_NEEDED != 0 means it's other parents are in
- * Chunk Extra Edge List
- */
- static final int GRAPH_EXTRA_EDGES_NEEDED = 0x80000000;
- }
|