Merge branch 'bw/grep-recurse-submodules'
"git grep --recurse-submodules" has been reworked to give a more consistent output across submodule boundary (and do its thing without having to fork a separate process). * bw/grep-recurse-submodules: grep: recurse in-process using 'struct repository' submodule: merge repo_read_gitmodules and gitmodules_config submodule: check for unmerged .gitmodules outside of config parsing submodule: check for unstaged .gitmodules outside of config parsing submodule: remove fetch.recursesubmodules from submodule-config parsing submodule: remove submodule.fetchjobs from submodule-config parsing config: add config_from_gitmodules cache.h: add GITMODULES_FILE macro repository: have the_repository use the_index repo_read_index: don't discard the index
This commit is contained in:
@ -4,7 +4,9 @@
|
||||
#include "submodule-config.h"
|
||||
|
||||
/* The main repository */
|
||||
static struct repository the_repo;
|
||||
static struct repository the_repo = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, 0, 0
|
||||
};
|
||||
struct repository *the_repository = &the_repo;
|
||||
|
||||
static char *git_path_from_env(const char *envvar, const char *git_dir,
|
||||
@ -235,8 +237,6 @@ int repo_read_index(struct repository *repo)
|
||||
{
|
||||
if (!repo->index)
|
||||
repo->index = xcalloc(1, sizeof(*repo->index));
|
||||
else
|
||||
discard_index(repo->index);
|
||||
|
||||
return read_index_from(repo->index, repo->index_file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user