mirror of
https://github.com/git/git.git
synced 2024-12-18 14:24:11 +08:00
e303bf22f9
The reftable format is structured as a sequence of blocks, and each block contains a sequence of prefix-compressed key-value records. There are 4 types of records, and they have similarities in how they must be handled. This is achieved by introducing a polymorphic 'record' type that encapsulates ref, log, index and object records. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
22 lines
446 B
C
22 lines
446 B
C
/*
|
|
Copyright 2020 Google LLC
|
|
|
|
Use of this source code is governed by a BSD-style
|
|
license that can be found in the LICENSE file or at
|
|
https://developers.google.com/open-source/licenses/bsd
|
|
*/
|
|
|
|
#ifndef CONSTANTS_H
|
|
#define CONSTANTS_H
|
|
|
|
#define BLOCK_TYPE_LOG 'g'
|
|
#define BLOCK_TYPE_INDEX 'i'
|
|
#define BLOCK_TYPE_REF 'r'
|
|
#define BLOCK_TYPE_OBJ 'o'
|
|
#define BLOCK_TYPE_ANY 0
|
|
|
|
#define MAX_RESTARTS ((1 << 16) - 1)
|
|
#define DEFAULT_BLOCK_SIZE 4096
|
|
|
|
#endif
|