summary refs log tree commit diff
path: root/fetch-pack.h
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2017-02-22 11:01:22 -0500
committerJunio C Hamano <gitster@pobox.com>2017-03-02 11:12:53 -0800
commite860d96bf89fca63f664eb2d507f2f14537a9008 (patch)
treed949af9bf5302164996a363d2cb400586fa542e1 /fetch-pack.h
parent3b9e3c2cede15057af3ff8076c45ad5f33829436 (diff)
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 <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.h')
-rw-r--r--fetch-pack.h6
1 files changed, 6 insertions, 0 deletions
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