Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 8cc648d85b..6abdad3294 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1,10 +1,11 @@
#include "builtin.h"
+#include "repository.h"
#include "cache.h"
+#include "config.h"
#include "parse-options.h"
#include "quote.h"
#include "pathspec.h"
#include "dir.h"
-#include "utf8.h"
#include "submodule.h"
#include "submodule-config.h"
#include "string-list.h"
@@ -279,7 +280,7 @@ static void module_list_active(struct module_list *list)
for (i = 0; i < list->nr; i++) {
const struct cache_entry *ce = list->entries[i];
- if (!is_submodule_initialized(ce->name))
+ if (!is_submodule_active(the_repository, ce->name))
continue;
ALLOC_GROW(active_modules.entries,
@@ -325,7 +326,7 @@ static int module_list(int argc, const char **argv, const char *prefix)
printf("%06o %s %d\t", ce->ce_mode,
oid_to_hex(&ce->oid), ce_stage(ce));
- utf8_fprintf(stdout, "%s\n", ce->name);
+ fprintf(stdout, "%s\n", ce->name);
}
return 0;
}
@@ -361,7 +362,7 @@ static void init_submodule(const char *path, const char *prefix, int quiet)
*
* Set active flag for the submodule being initialized
*/
- if (!is_submodule_initialized(path)) {
+ if (!is_submodule_active(the_repository, path)) {
strbuf_reset(&sb);
strbuf_addf(&sb, "submodule.%s.active", sub->name);
git_config_set_gently(sb.buf, "true");
@@ -816,7 +817,7 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
}
/* Check if the submodule has been initialized. */
- if (!is_submodule_initialized(ce->name)) {
+ if (!is_submodule_active(the_repository, ce->name)) {
next_submodule_warn_missing(suc, out, displaypath);
goto cleanup;
}
@@ -1037,7 +1038,7 @@ static int update_clone(int argc, const char **argv, const char *prefix)
return 1;
for_each_string_list_item(item, &suc.projectlines)
- utf8_fprintf(stdout, "%s", item->string);
+ fprintf(stdout, "%s", item->string);
return 0;
}
@@ -1192,7 +1193,7 @@ static int is_active(int argc, const char **argv, const char *prefix)
gitmodules_config();
- return !is_submodule_initialized(argv[1]);
+ return !is_submodule_active(the_repository, argv[1]);
}
#define SUPPORT_SUPER_PREFIX (1<<0)
@@ -1221,9 +1222,8 @@ static struct cmd_struct commands[] = {
int cmd_submodule__helper(int argc, const char **argv, const char *prefix)
{
int i;
- if (argc < 2)
- die(_("submodule--helper subcommand must be "
- "called with a subcommand"));
+ if (argc < 2 || !strcmp(argv[1], "-h"))
+ usage("git submodule--helper <command>");
for (i = 0; i < ARRAY_SIZE(commands); i++) {
if (!strcmp(argv[1], commands[i].cmd)) {