commit: add generation number to struct commit
[gitweb.git] / connected.h
index 12594efa1637f81bfd21070e9bb952bad4b5e662..a53f03a61aca4871be5ab75db9bf63ee895668e1 100644 (file)
@@ -8,7 +8,7 @@ struct transport;
  * 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]);
+typedef int (*oid_iterate_fn)(void *, struct object_id *oid);
 
 /*
  * Named-arguments struct for check_connected. All arguments are
@@ -23,6 +23,21 @@ struct check_connected_options {
 
        /* Transport whose objects we are checking, if available. */
        struct transport *transport;
+
+       /*
+        * If non-zero, send error messages to this descriptor rather
+        * than stderr. The descriptor is closed before check_connected
+        * returns.
+        */
+       int err_fd;
+
+       /* If non-zero, show progress as we traverse the objects. */
+       int progress;
+
+       /*
+        * Insert these variables into the environment of the child process.
+        */
+       const char **env;
 };
 
 #define CHECK_CONNECTED_INIT { 0 }
@@ -36,7 +51,7 @@ struct check_connected_options {
  *
  * If "opt" is NULL, behaves as if CHECK_CONNECTED_INIT was passed.
  */
-int check_connected(sha1_iterate_fn fn, void *cb_data,
+int check_connected(oid_iterate_fn fn, void *cb_data,
                    struct check_connected_options *opt);
 
 #endif /* CONNECTED_H */