diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-10-05 12:36:21 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-10-05 12:36:21 -0700 |
| commit | 6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9 (patch) | |
| tree | a804881bfeb0e7b859d531b41bf95b1efaa891f5 /connected.h | |
| parent | Merge branch 'jc/fetch-verify' (diff) | |
| parent | receive-pack: check connectivity before concluding "git push" (diff) | |
| download | git-6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9.tar.gz git-6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9.zip | |
Merge branch 'jc/receive-verify'
* jc/receive-verify:
receive-pack: check connectivity before concluding "git push"
check_everything_connected(): libify
check_everything_connected(): refactor to use an iterator
fetch: verify we have everything we need before updating our ref
Conflicts:
builtin/fetch.c
Diffstat (limited to 'connected.h')
| -rw-r--r-- | connected.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/connected.h b/connected.h new file mode 100644 index 0000000000..7e4585a6cb --- /dev/null +++ b/connected.h @@ -0,0 +1,20 @@ +#ifndef CONNECTED_H +#define CONNECTED_H + +/* + * Take callback data, and return next object name in the buffer. + * When called after returning the name for the last object, return -1 + * to signal EOF, otherwise return 0. + */ +typedef int (*sha1_iterate_fn)(void *, unsigned char [20]); + +/* + * Make sure that our object store has all the commits necessary to + * connect the ancestry chain to some of our existing refs, and all + * the trees and blobs that these commits use. + * + * Return 0 if Ok, non zero otherwise (i.e. some missing objects) + */ +extern int check_everything_connected(sha1_iterate_fn, int quiet, void *cb_data); + +#endif /* CONNECTED_H */ |
