Junio C Hamano | f96400c | 2011-09-02 16:33:22 -0700 | [diff] [blame] | 1 | #ifndef CONNECTED_H |
| 2 | #define CONNECTED_H |
| 3 | |
Nguyễn Thái Ngọc Duy | c6807a4 | 2013-05-26 08:16:17 +0700 | [diff] [blame] | 4 | struct transport; |
| 5 | |
Junio C Hamano | f96400c | 2011-09-02 16:33:22 -0700 | [diff] [blame] | 6 | /* |
| 7 | * Take callback data, and return next object name in the buffer. |
| 8 | * When called after returning the name for the last object, return -1 |
| 9 | * to signal EOF, otherwise return 0. |
| 10 | */ |
| 11 | typedef int (*sha1_iterate_fn)(void *, unsigned char [20]); |
| 12 | |
| 13 | /* |
| 14 | * Make sure that our object store has all the commits necessary to |
| 15 | * connect the ancestry chain to some of our existing refs, and all |
| 16 | * the trees and blobs that these commits use. |
| 17 | * |
| 18 | * Return 0 if Ok, non zero otherwise (i.e. some missing objects) |
| 19 | */ |
| 20 | extern int check_everything_connected(sha1_iterate_fn, int quiet, void *cb_data); |
Nguyễn Thái Ngọc Duy | 614db3e | 2013-12-05 20:02:46 +0700 | [diff] [blame] | 21 | extern int check_shallow_connected(sha1_iterate_fn, int quiet, void *cb_data, |
| 22 | const char *shallow_file); |
Nguyễn Thái Ngọc Duy | c6807a4 | 2013-05-26 08:16:17 +0700 | [diff] [blame] | 23 | extern int check_everything_connected_with_transport(sha1_iterate_fn, int quiet, |
| 24 | void *cb_data, |
| 25 | struct transport *transport); |
Junio C Hamano | f96400c | 2011-09-02 16:33:22 -0700 | [diff] [blame] | 26 | |
| 27 | #endif /* CONNECTED_H */ |