1fbde41bf6a11f0e7ec03f2d48c9a1d13300fc84
   1submodule config cache API
   2==========================
   3
   4The submodule config cache API allows to read submodule
   5configurations/information from specified revisions. Internally
   6information is lazily read into a cache that is used to avoid
   7unnecessary parsing of the same .gitmodule files. Lookups can be done by
   8submodule path or name.
   9
  10Usage
  11-----
  12
  13The caller can look up information about submodules by using the
  14`submodule_from_path()` or `submodule_from_name()` functions. They return
  15a `struct submodule` which contains the values. The API automatically
  16initializes and allocates the needed infrastructure on-demand.
  17
  18If the internal cache might grow too big or when the caller is done with
  19the API, all internally cached values can be freed with submodule_free().
  20
  21Data Structures
  22---------------
  23
  24`struct submodule`::
  25
  26        This structure is used to return the information about one
  27        submodule for a certain revision. It is returned by the lookup
  28        functions.
  29
  30Functions
  31---------
  32
  33`void submodule_free()`::
  34
  35        Use these to free the internally cached values.
  36
  37`const struct submodule *submodule_from_path(const unsigned char *commit_sha1, const char *path)`::
  38
  39        Lookup values for one submodule by its commit_sha1 and path.
  40
  41`const struct submodule *submodule_from_name(const unsigned char *commit_sha1, const char *name)`::
  42
  43        The same as above but lookup by name.
  44
  45For an example usage see test-submodule-config.c.