Convert the verify_pack callback to struct object_id
[gitweb.git] / submodule.h
index 486371d2c34a9397d9f075f052cbae774ad662e7..89c2ed219177d07db5529bbac2d2a7996572f387 100644 (file)
@@ -84,10 +84,10 @@ extern int submodule_uses_gitfile(const char *path);
 #define SUBMODULE_REMOVAL_IGNORE_UNTRACKED (1<<1)
 #define SUBMODULE_REMOVAL_IGNORE_IGNORED_UNTRACKED (1<<2)
 extern int bad_to_remove_submodule(const char *path, unsigned flags);
-extern int merge_submodule(unsigned char result[20], const char *path,
-                          const unsigned char base[20],
-                          const unsigned char a[20],
-                          const unsigned char b[20], int search);
+extern int merge_submodule(struct object_id *result, const char *path,
+                          const struct object_id *base,
+                          const struct object_id *a,
+                          const struct object_id *b, int search);
 extern int find_unpushed_submodules(struct oid_array *commits,
                                    const char *remotes_name,
                                    struct string_list *needs_pushing);
@@ -98,6 +98,12 @@ extern int push_unpushed_submodules(struct oid_array *commits,
                                    int dry_run);
 extern void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
 extern int parallel_submodules(void);
+/*
+ * Given a submodule path (as in the index), return the repository
+ * path of that submodule in 'buf'. Return -1 on error or when the
+ * submodule is not initialized.
+ */
+int submodule_to_gitdir(struct strbuf *buf, const char *submodule);
 
 #define SUBMODULE_MOVE_HEAD_DRY_RUN (1<<0)
 #define SUBMODULE_MOVE_HEAD_FORCE   (1<<1)