Split off the pretty print stuff into its own file
[gitweb.git] / builtin-fetch--tool.c
index 1e43d792216248c1abe3504c239ccd325f8d5ef1..6a78517958567e9dee4bfb00236caf5c3d1c3d67 100644 (file)
@@ -25,7 +25,7 @@ static int update_ref_env(const char *action,
                      unsigned char *oldval)
 {
        char msg[1024];
-       char *rla = getenv("GIT_REFLOG_ACTION");
+       const char *rla = getenv("GIT_REFLOG_ACTION");
 
        if (!rla)
                rla = "(reflog update)";
@@ -61,7 +61,7 @@ static int update_local_ref(const char *name,
        }
 
        if (get_sha1(name, sha1_old)) {
-               char *msg;
+               const char *msg;
        just_store:
                /* new ref */
                if (!strncmp(name, "refs/tags/", 10))
@@ -131,7 +131,7 @@ static int append_fetch_head(FILE *fp,
 
        if (get_sha1(head, sha1))
                return error("Not a valid object name: %s", head);
-       commit = lookup_commit_reference(sha1);
+       commit = lookup_commit_reference_gently(sha1, 1);
        if (!commit)
                not_for_merge = 1;