Re: [PATCH v3 4/8] fetch: refactor the population of peer ref OIDs
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jun 25, 2018, 17:45 UTC
- Message-ID
- <20180625174511.53903-1-jonathantanmy@google.com>
- In-Reply-To
- <20180620213235.10952-5-bmwill@google.com>
> Populate peer ref OIDs in get_ref_map instead of do_fetch. Besides > tightening scopes of variables in the code, this also prepares for > get_ref_map being able to be called multiple times within do_fetch.
get_ref_map() is only called in one place in builtin/fetch.c, and that place is in do_fetch(), so moving functionality from do_fetch() to get_ref_map() is perfectly fine, and also allows tightening of the scope of the existing_refs variable.
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>