From e860d96bf89fca63f664eb2d507f2f14537a9008 Mon Sep 17 00:00:00 2001 From: Matt McCutchen Date: Wed, 22 Feb 2017 11:01:22 -0500 Subject: fetch-pack: move code to report unmatched refs to a function Prepare to reuse this code in transport.c for "git fetch". While we're here, internationalize the existing error message. Signed-off-by: Matt McCutchen Signed-off-by: Junio C Hamano --- fetch-pack.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fetch-pack.h') diff --git a/fetch-pack.h b/fetch-pack.h index c912e3d321..a2d46e6e75 100644 --- a/fetch-pack.h +++ b/fetch-pack.h @@ -45,4 +45,10 @@ struct ref *fetch_pack(struct fetch_pack_args *args, struct sha1_array *shallow, char **pack_lockfile); +/* + * Print an appropriate error message for each sought ref that wasn't + * matched. Return 0 if all sought refs were matched, otherwise 1. + */ +int report_unmatched_refs(struct ref **sought, int nr_sought); + #endif -- cgit v1.2.3