git-svn: fix --rmdir when using SVN:: libraries
[gitweb.git] / builtin-log.c
index 29a885121dd81f1e6288835d12374acc19a751f4..9187fd337ba767384abab26224b95610aa531807 100644 (file)
@@ -40,6 +40,8 @@ static int cmd_log_wc(int argc, const char **argv, char **envp,
                log_tree_commit(rev, commit);
                free(commit->buffer);
                commit->buffer = NULL;
+               free_commit_list(commit->parents);
+               commit->parents = NULL;
        }
        return 0;
 }
@@ -51,6 +53,7 @@ int cmd_whatchanged(int argc, const char **argv, char **envp)
        init_revisions(&rev);
        rev.diff = 1;
        rev.diffopt.recursive = 1;
+       rev.simplify_history = 0;
        return cmd_log_wc(argc, argv, envp, &rev);
 }
 
@@ -112,7 +115,7 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
        int len = 0;
 
        if (output_directory) {
-               strncpy(filename, output_directory, 1010);
+               safe_strncpy(filename, output_directory, 1010);
                len = strlen(filename);
                if (filename[len - 1] != '/')
                        filename[len++] = '/';
@@ -217,8 +220,11 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
                }
                else if (!strcmp(argv[i], "--signoff") ||
                         !strcmp(argv[i], "-s")) {
-                       const char *committer = git_committer_info(1);
-                       const char *endpos = strchr(committer, '>');
+                       const char *committer;
+                       const char *endpos;
+                       setup_ident();
+                       committer = git_committer_info(1);
+                       endpos = strchr(committer, '>');
                        if (!endpos)
                                die("bogos committer info %s\n", committer);
                        add_signoff = xmalloc(endpos - committer + 2);