summaryrefslogtreecommitdiff
path: root/pack-mtimes.h
blob: cc957b3e852716541f764a40641462cb39fe0407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef PACK_MTIMES_H
#define PACK_MTIMES_H
 
#include "git-compat-util.h"
 
#define MTIMES_SIGNATURE 0x4d544d45 /* "MTME" */
#define MTIMES_VERSION 1
 
struct packed_git;
 
/*
 * Loads the .mtimes file corresponding to "p", if any, returning zero
 * on success.
 */
int load_pack_mtimes(struct packed_git *p);
 
/* Returns the mtime associated with the object at position "pos" (in
 * lexicographic/index order) in pack "p".
 *
 * Note that it is a BUG() to call this function if either (a) "p" does
 * not have a corresponding .mtimes file, or (b) it does, but it hasn't
 * been loaded
 */
uint32_t nth_packed_mtime(struct packed_git *p, uint32_t pos);
 
#endif