]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch: rename function report_set_head
authorMatt Hunter <m@lfurio.us>
Fri, 19 Jun 2026 09:44:23 +0000 (05:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2026 16:19:35 +0000 (09:19 -0700)
Update to the slightly more obvious name 'warn_set_head', which matches
the verbiage of the followRemoteHEAD options.

Signed-off-by: Matt Hunter <m@lfurio.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c

index 82969e230f5adbb2c6797069e1f07e86348a5969..9a45e1e7a44de43abbccbde6b906155427e7c227 100644 (file)
@@ -1707,7 +1707,7 @@ static void set_head_advice_msg(const char *remote, const char *head_name)
                        remote, head_name, remote, remote, head_name);
 }
 
-static void report_set_head(const char *remote, const char *head_name,
+static void warn_set_head(const char *remote, const char *head_name,
                        struct strbuf *buf_prev, int updateres) {
        struct strbuf buf_prefix = STRBUF_INIT;
        const char *prev_head = NULL;
@@ -1787,7 +1787,7 @@ static int set_head(const struct ref *remote_refs, struct remote *remote)
        if (verbosity >= 0 &&
                follow_remote_head == FOLLOW_REMOTE_WARN &&
                (!no_warn_branch || strcmp(no_warn_branch, head_name)))
-               report_set_head(remote->name, head_name, &b_local_head, was_detached);
+               warn_set_head(remote->name, head_name, &b_local_head, was_detached);
 
 cleanup:
        free(head_name);