log: add -P as a synonym for --perl-regexp
[gitweb.git] / submodule.h
index 8a8bc49dc9626b9ba4112f3b0bf25b212d864d1d..1277480add48140c6bf8c6cbc51cb962e27637ae 100644 (file)
@@ -3,7 +3,8 @@
 
 struct diff_options;
 struct argv_array;
-struct sha1_array;
+struct oid_array;
+struct remote;
 
 enum {
        RECURSE_SUBMODULES_ONLY = -5,
@@ -72,7 +73,7 @@ extern int should_update_submodules(void);
  * and it should be updated. Returns NULL otherwise.
  */
 extern const struct submodule *submodule_from_ce(const struct cache_entry *ce);
-extern void check_for_new_submodule_commits(unsigned char new_sha1[20]);
+extern void check_for_new_submodule_commits(struct object_id *oid);
 extern int fetch_populated_submodules(const struct argv_array *options,
                               const char *prefix, int command_line_option,
                               int quiet, int max_parallel_jobs);
@@ -87,14 +88,22 @@ 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 find_unpushed_submodules(struct sha1_array *commits,
+extern int find_unpushed_submodules(struct oid_array *commits,
                                    const char *remotes_name,
                                    struct string_list *needs_pushing);
-extern int push_unpushed_submodules(struct sha1_array *commits,
-                                   const char *remotes_name,
+extern int push_unpushed_submodules(struct oid_array *commits,
+                                   const struct remote *remote,
+                                   const char **refspec, int refspec_nr,
+                                   const struct string_list *push_options,
                                    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)