add replay and log to the usage string of git-bisect
[gitweb.git] / builtin-log.c
index f3cff13edc80afad27b9f7930a0a736ba5aa6d16..982d871887a6cd5f3e751a8c650ef95e8332b186 100644 (file)
@@ -50,8 +50,11 @@ static int cmd_log_walk(struct rev_info *rev)
        prepare_revision_walk(rev);
        while ((commit = get_revision(rev)) != NULL) {
                log_tree_commit(rev, commit);
-               free(commit->buffer);
-               commit->buffer = NULL;
+               if (!rev->reflog_info) {
+                       /* we allow cycles in reflog ancestry */
+                       free(commit->buffer);
+                       commit->buffer = NULL;
+               }
                free_commit_list(commit->parents);
                commit->parents = NULL;
        }
@@ -349,7 +352,7 @@ static void get_patch_ids(struct rev_info *rev, struct diff_options *options, co
 
 static void gen_message_id(char *dest, unsigned int length, char *base)
 {
-       const char *committer = git_committer_info(1);
+       const char *committer = git_committer_info(-1);
        const char *email_start = strrchr(committer, '<');
        const char *email_end = strrchr(committer, '>');
        if(!email_start || !email_end || email_start > email_end - 1)
@@ -377,7 +380,6 @@ 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;
@@ -473,7 +475,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
        if (!rev.diffopt.text)
                rev.diffopt.binary = 1;
 
-       if (!output_directory)
+       if (!output_directory && !use_stdout)
                output_directory = prefix;
 
        if (output_directory) {