OSDN Git Service

fetch: Give remote_ref to update_local_ref() as well
authorMarc Branchaud <marcnarc@xiplink.com>
Mon, 16 Apr 2012 22:08:49 +0000 (18:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Apr 2012 15:25:44 +0000 (08:25 -0700)
This way, the function can look at the remote side to adjust the
informational message it gives.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c

index 8ec4eae..06d71e4 100644 (file)
@@ -240,6 +240,7 @@ static int s_update_ref(const char *action,
 
 static int update_local_ref(struct ref *ref,
                            const char *remote,
+                           const struct ref *remote_ref,
                            struct strbuf *display)
 {
        struct commit *current = NULL, *updated;
@@ -466,7 +467,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
                        strbuf_reset(&note);
                        if (ref) {
-                               rc |= update_local_ref(ref, what, &note);
+                               rc |= update_local_ref(ref, what, rm, &note);
                                free(ref);
                        } else
                                strbuf_addf(&note, "* %-*s %-*s -> FETCH_HEAD",