diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-11-03 15:13:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-11-03 15:13:04 -0800 |
commit | acfeaf8c962772e482bb705afd93bea7a7fa078e (patch) | |
tree | 0618043c2b06151a3a77a86906e8b6591df50ade /submodule.c | |
parent | c253b82e42d8e6673917efb431479f8a9165de76 (diff) | |
parent | 9a6e4f032ef7ca45a71639ff5e60cbb9b8a6e556 (diff) | |
download | git-acfeaf8c962772e482bb705afd93bea7a7fa078e.tar.gz |
Merge branch 'jk/initialization-fix-to-add-submodule-odb'
We peek objects from submodule's object store by linking it to the
list of alternate object databases, but the code to do so forgot to
correctly initialize the list.
* jk/initialization-fix-to-add-submodule-odb:
add_submodule_odb: initialize alt_odb list earlier
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c index 5879cfb158..88af54c633 100644 --- a/submodule.c +++ b/submodule.c @@ -130,6 +130,7 @@ static int add_submodule_odb(const char *path) goto done; } /* avoid adding it twice */ + prepare_alt_odb(); for (alt_odb = alt_odb_list; alt_odb; alt_odb = alt_odb->next) if (alt_odb->name - alt_odb->base == objects_directory.len && !strncmp(alt_odb->base, objects_directory.buf, @@ -148,7 +149,6 @@ static int add_submodule_odb(const char *path) /* add possible alternates from the submodule */ read_info_alternates(objects_directory.buf, 0); - prepare_alt_odb(); done: strbuf_release(&objects_directory); return ret; |