line-log: fix crash when --first-parent is used
[gitweb.git] / submodule.c
index 86854248983be78b3702f5045a659dfe83bf4446..3f0a3f9419a3dead24cd8e850051f595d0b5974f 100644 (file)
@@ -226,6 +226,7 @@ static void print_submodule_summary(struct rev_info *rev, FILE *f,
        while ((commit = get_revision(rev))) {
                struct pretty_print_context ctx = {0};
                ctx.date_mode = rev->date_mode;
+               ctx.output_encoding = get_log_output_encoding();
                strbuf_setlen(&sb, 0);
                strbuf_addstr(&sb, line_prefix);
                if (commit->object.flags & SYMMETRIC_LEFT) {
@@ -623,7 +624,7 @@ int fetch_populated_submodules(const struct argv_array *options,
                struct strbuf submodule_path = STRBUF_INIT;
                struct strbuf submodule_git_dir = STRBUF_INIT;
                struct strbuf submodule_prefix = STRBUF_INIT;
-               struct cache_entry *ce = active_cache[i];
+               const struct cache_entry *ce = active_cache[i];
                const char *git_dir, *name, *default_argv;
 
                if (!S_ISGITLINK(ce->ce_mode))