object-store: move function declarations to their respective subsystems
We carry declarations for a couple of functions in "object-store.h" that are not defined in "object-store.c", but in a different subsystem. Move these declarations to the respective headers whose matching code files carry the corresponding definition. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0b8ed25b66
commit
1a793261c5
19
packfile.h
19
packfile.h
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "list.h"
|
||||
#include "object.h"
|
||||
#include "object-store.h"
|
||||
#include "oidset.h"
|
||||
|
||||
/* in object-store.h */
|
||||
@@ -117,6 +118,24 @@ void for_each_file_in_pack_dir(const char *objdir,
|
||||
each_file_in_pack_dir_fn fn,
|
||||
void *data);
|
||||
|
||||
/*
|
||||
* Iterate over all accessible packed objects without respect to reachability.
|
||||
* By default, this includes both local and alternate packs.
|
||||
*
|
||||
* Note that some objects may appear twice if they are found in multiple packs.
|
||||
* Each pack is visited in an unspecified order. By default, objects within a
|
||||
* pack are visited in pack-idx order (i.e., sorted by oid).
|
||||
*/
|
||||
typedef int each_packed_object_fn(const struct object_id *oid,
|
||||
struct packed_git *pack,
|
||||
uint32_t pos,
|
||||
void *data);
|
||||
int for_each_object_in_pack(struct packed_git *p,
|
||||
each_packed_object_fn, void *data,
|
||||
enum for_each_object_flags flags);
|
||||
int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
|
||||
void *data, enum for_each_object_flags flags);
|
||||
|
||||
/* A hook to report invalid files in pack directory */
|
||||
#define PACKDIR_FILE_PACK 1
|
||||
#define PACKDIR_FILE_IDX 2
|
||||
|
||||
Reference in New Issue
Block a user