Nguyễn Thái Ngọc Duy  <pclo...@gmail.com> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
> ---

So... the idea is that the caller gives a ref-store and tells these
functions to iterate over refs in it, and the existing submodule
related callers can prepare a ref-store for the submodule---that
way, refs.[ch] layer does not have to _care_ that the set of refs it
was asked to look at is for submodule processing.

Nice.  Very nice.

> @@ -2120,8 +2129,14 @@ static int handle_revision_pseudo_opt(const char 
> *submodule,
>  {
>       const char *arg = argv[0];
>       const char *optarg;
> +     struct ref_store *refs;
>       int argcount;
>  
> +     if (submodule) {
> +             refs = get_submodule_ref_store(submodule);
> +     } else
> +             refs = get_main_ref_store();
> +

Reply via email to