]> git.ipfire.org Git - thirdparty/git.git/blobdiff - repository.h
Merge branch 'en/rebase-merge-on-sequencer'
[thirdparty/git.git] / repository.h
index 9f16c42c1ed04af3bf2e7767c4fd6c05b28ccf9c..0e482b7d49e82c3cf46d81523e057e3a02d2e8f4 100644 (file)
@@ -116,9 +116,17 @@ void repo_set_worktree(struct repository *repo, const char *path);
 void repo_set_hash_algo(struct repository *repo, int algo);
 void initialize_the_repository(void);
 int repo_init(struct repository *r, const char *gitdir, const char *worktree);
-int repo_submodule_init(struct repository *submodule,
+
+/*
+ * Initialize the repository 'subrepo' as the submodule given by the
+ * struct submodule 'sub' in parent repository 'superproject'.
+ * Return 0 upon success and a non-zero value upon failure, which may happen
+ * if the submodule is not found, or 'sub' is NULL.
+ */
+struct submodule;
+int repo_submodule_init(struct repository *subrepo,
                        struct repository *superproject,
-                       const char *path);
+                       const struct submodule *sub);
 void repo_clear(struct repository *repo);
 
 /*