Merge branch 'sb/misc-cleanups' into HEAD
[gitweb.git] / submodule-config.c
index 967bba232a523e6e5bf123ef749c54ab81d113a2..7f67ec0c6a826cca0ba80ce5990d5f0f3a0dcaa6 100644 (file)
@@ -392,8 +392,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
                struct hashmap_iter iter;
                struct submodule_entry *entry;
 
-               hashmap_iter_init(&cache->for_name, &iter);
-               entry = hashmap_iter_next(&iter);
+               entry = hashmap_iter_first(&cache->for_name, &iter);
                if (!entry)
                        return NULL;
                return entry->config;
@@ -427,8 +426,8 @@ static const struct submodule *config_from(struct submodule_cache *cache,
        parameter.commit_sha1 = commit_sha1;
        parameter.gitmodules_sha1 = sha1;
        parameter.overwrite = 0;
-       git_config_from_buf(parse_config, rev.buf, config, config_size,
-                       &parameter);
+       git_config_from_mem(parse_config, "submodule-blob", rev.buf,
+                       config, config_size, &parameter);
        free(config);
 
        switch (lookup_type) {