Racy git: avoid having to be always too careful
[gitweb.git] / builtin-log.c
index 82c69d1d0593156c5f7034746fe68f5a1a9f7276..691cf3aef785950132c6be65f8aab39d4b12207e 100644 (file)
@@ -34,7 +34,6 @@ static int cmd_log_walk(struct rev_info *rev)
        struct commit *commit;
 
        prepare_revision_walk(rev);
-       setup_pager();
        while ((commit = get_revision(rev)) != NULL) {
                log_tree_commit(rev, commit);
                free(commit->buffer);
@@ -258,6 +257,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
        char message_id[1024];
        char ref_message_id[1024];
 
+       setup_ident();
        git_config(git_format_config);
        init_revisions(&rev, prefix);
        rev.commit_format = CMIT_FMT_EMAIL;
@@ -307,7 +307,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                         !strcmp(argv[i], "-s")) {
                        const char *committer;
                        const char *endpos;
-                       setup_ident();
                        committer = git_committer_info(1);
                        endpos = strchr(committer, '>');
                        if (!endpos)