Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2017-02-22 19:01:22 +0300
committerJunio C Hamano <gitster@pobox.com>2017-03-02 22:12:53 +0300
commite860d96bf89fca63f664eb2d507f2f14537a9008 (patch)
treed949af9bf5302164996a363d2cb400586fa542e1 /builtin/fetch-pack.c
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 'builtin/fetch-pack.c')
-rw-r--r--builtin/fetch-pack.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index cfe9e447c2..2a1c1c213f 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -219,12 +219,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
* remote no-such-ref' would silently succeed without issuing
* an error.
*/
- for (i = 0; i < nr_sought; i++) {
- if (!sought[i] || sought[i]->matched)
- continue;
- error("no such remote ref %s", sought[i]->name);
- ret = 1;
- }
+ ret |= report_unmatched_refs(sought, nr_sought);
while (ref) {
printf("%s %s\n",