aboutsummaryrefslogtreecommitdiff
path: root/connected.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 12:36:21 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-05 12:36:21 -0700
commit6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9 (patch)
treea804881bfeb0e7b859d531b41bf95b1efaa891f5 /connected.h
parent2e2e7e9dd07107af8ce96428929775f267fdf98a (diff)
parent52fed6e1ce07250ada3d2d0128015f131e3ad6c1 (diff)
downloadgit-6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9.tar.gz
git-6f62cd7ab1c47a7ea32ab05cf1292d82c47310e9.tar.xz
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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/connected.h b/connected.h
new file mode 100644
index 000000000..7e4585a6c
--- /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 */