submodule: convert is_submodule_initialized to work on a repository
Convert 'is_submodule_initialized()' to take a repository object and while we're at it, lets rename the function to 'is_submodule_active()' and remove the NEEDSWORK comment. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
69aba5329e
commit
627d9342fe
@ -4,6 +4,7 @@
|
||||
* Copyright (c) 2006 Junio C Hamano
|
||||
*/
|
||||
#include "cache.h"
|
||||
#include "repository.h"
|
||||
#include "config.h"
|
||||
#include "blob.h"
|
||||
#include "tree.h"
|
||||
@ -643,7 +644,7 @@ static int grep_submodule_launch(struct grep_opt *opt,
|
||||
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)) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user