refs.h: let for_each_namespaced_ref() take excluded patterns
A future commit will want to call `for_each_namespaced_ref()` with a list of excluded patterns. We could introduce a variant of that function, say, `for_each_namespaced_ref_exclude()` which takes the extra parameter, and reimplement the original function in terms of that. But all but one caller (in `http-backend.c`) will supply the new parameter, so add the new parameter to `for_each_namespaced_ref()` itself instead of introducing a new function. For now, supply NULL for the list of excluded patterns at all callers to avoid changing behavior, which we will do in a future change. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c45841fff8
commit
e6bf24d39a
@ -855,7 +855,7 @@ static void deepen(struct upload_pack_data *data, int depth)
|
||||
* marked with OUR_REF.
|
||||
*/
|
||||
head_ref_namespaced(check_ref, data);
|
||||
for_each_namespaced_ref(check_ref, data);
|
||||
for_each_namespaced_ref(NULL, check_ref, data);
|
||||
|
||||
get_reachable_list(data, &reachable_shallows);
|
||||
result = get_shallow_commits(&reachable_shallows,
|
||||
@ -1386,7 +1386,7 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
|
||||
if (advertise_refs)
|
||||
data.no_done = 1;
|
||||
head_ref_namespaced(send_ref, &data);
|
||||
for_each_namespaced_ref(send_ref, &data);
|
||||
for_each_namespaced_ref(NULL, send_ref, &data);
|
||||
if (!data.sent_capabilities) {
|
||||
const char *refname = "capabilities^{}";
|
||||
write_v0_ref(&data, refname, refname, null_oid());
|
||||
@ -1400,7 +1400,7 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
|
||||
packet_flush(1);
|
||||
} else {
|
||||
head_ref_namespaced(check_ref, &data);
|
||||
for_each_namespaced_ref(check_ref, &data);
|
||||
for_each_namespaced_ref(NULL, check_ref, &data);
|
||||
}
|
||||
|
||||
if (!advertise_refs) {
|
||||
|
||||
Reference in New Issue
Block a user