diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-09-13 20:38:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-13 20:38:23 +0200 |
commit | f322e9f51b5a2ca303a6691d0e2d1f3f754923ff (patch) | |
tree | 854b7f33b056c6233b10e7e7e164c3bb6fb34f76 /repository.h | |
parent | Merge branch 'ed/fsmonitor-on-network-disk' (diff) | |
parent | submodule--helper: fix bad config API usage (diff) | |
download | git-f322e9f51b5a2ca303a6691d0e2d1f3f754923ff.tar.xz git-f322e9f51b5a2ca303a6691d0e2d1f3f754923ff.zip |
Merge branch 'ab/submodule-helper-prep'
Code clean-up of "git submodule--helper".
* ab/submodule-helper-prep: (33 commits)
submodule--helper: fix bad config API usage
submodule--helper: libify even more "die" paths for module_update()
submodule--helper: libify more "die" paths for module_update()
submodule--helper: check repo{_submodule,}_init() return values
submodule--helper: libify "must_die_on_failure" code paths (for die)
submodule--helper update: don't override 'checkout' exit code
submodule--helper: libify "must_die_on_failure" code paths
submodule--helper: libify determine_submodule_update_strategy()
submodule--helper: don't exit() on failure, return
submodule--helper: use "code" in run_update_command()
submodule API: don't handle SM_..{UNSPECIFIED,COMMAND} in to_string()
submodule--helper: don't call submodule_strategy_to_string() in BUG()
submodule--helper: add missing braces to "else" arm
submodule--helper: return "ret", not "1" from update_submodule()
submodule--helper: rename "int res" to "int ret"
submodule--helper: don't redundantly check "else if (res)"
submodule--helper: refactor "errmsg_str" to be a "struct strbuf"
submodule--helper: add "const" to passed "struct update_data"
submodule--helper: add "const" to copy of "update_data"
submodule--helper: add "const" to passed "module_clone_data"
...
Diffstat (limited to 'repository.h')
-rw-r--r-- | repository.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/repository.h b/repository.h index 797f471cce..24316ac944 100644 --- a/repository.h +++ b/repository.h @@ -1,6 +1,7 @@ #ifndef REPOSITORY_H #define REPOSITORY_H +#include "git-compat-util.h" #include "path.h" struct config_set; @@ -186,6 +187,7 @@ void repo_set_gitdir(struct repository *repo, const char *root, 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); +RESULT_MUST_BE_USED int repo_init(struct repository *r, const char *gitdir, const char *worktree); /* @@ -197,6 +199,7 @@ int repo_init(struct repository *r, const char *gitdir, const char *worktree); * Return 0 upon success and a non-zero value upon failure. */ struct object_id; +RESULT_MUST_BE_USED int repo_submodule_init(struct repository *subrepo, struct repository *superproject, const char *path, |