* Copyright (c) 2006 Junio C Hamano
*/
#include "cache.h"
+#include "repository.h"
#include "config.h"
#include "blob.h"
#include "tree.h"
* submodule process has its own thread pool.
*/
argv_array_pushf(&submodule_options, "--threads=%d",
- (num_threads + 1) / 2);
+ DIV_ROUND_UP(num_threads, 2));
/* Add Pathspecs */
argv_array_push(&submodule_options, "--");
static int grep_submodule(struct grep_opt *opt, const struct object_id *oid,
const char *filename, const char *path)
{
- if (!is_submodule_initialized(path))
+ if (!is_submodule_active(the_repository, path))
return 0;
if (!is_submodule_populated_gently(path, NULL)) {
/*
- * If searching history, check for the presense of the
+ * If searching history, check for the presence of the
* submodule's gitdir before skipping the submodule.
*/
if (oid) {
if (!opt.pattern_list)
die(_("no pattern given."));
- if (!opt.fixed && opt.ignore_case)
- opt.regflags |= REG_ICASE;
/*
* We have to find "--" in a separate pass, because its presence