git-merge --squash
[gitweb.git] / builtin-log.c
index 9187fd337ba767384abab26224b95610aa531807..5a8a50b81dabea4ccd9b0ba0fcb5d925a00560d0 100644 (file)
@@ -257,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);
        }