t/README: start testing porcelainish
[gitweb.git] / builtin-log.c
index 6afa66ce02bee9a0de4403e1bfb0eedb70c087df..44d2d136f585a74e462556a4f756c7a297cadd51 100644 (file)
@@ -115,7 +115,7 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
        int len = 0;
 
        if (output_directory) {
-               safe_strncpy(filename, output_directory, 1010);
+               strlcpy(filename, output_directory, 1010);
                len = strlen(filename);
                if (filename[len - 1] != '/')
                        filename[len++] = '/';
@@ -220,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);
@@ -254,8 +257,8 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
                            output_directory);
        }
 
-       if (rev.pending_objects && rev.pending_objects->next == NULL) {
-               rev.pending_objects->item->flags |= UNINTERESTING;
+       if (rev.pending.nr == 1) {
+               rev.pending.objects[0].item->flags |= UNINTERESTING;
                add_head(&rev);
        }