]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff.c
Documentation: typofix --column description
[thirdparty/git.git] / diff.c
diff --git a/diff.c b/diff.c
index d24f47df993ead73df360571a6ad9cbac604287f..2253ec880298b4f146cb20f6dbae365d77b8fdfe 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4115,6 +4115,9 @@ void diff_free_filespec_blob(struct diff_filespec *s)
 
 void diff_free_filespec_data(struct diff_filespec *s)
 {
+       if (!s)
+               return;
+
        diff_free_filespec_blob(s);
        FREE_AND_NULL(s->cnt_data);
 }
@@ -4631,7 +4634,8 @@ void diff_setup_done(struct diff_options *options)
         * inside contents.
         */
 
-       if ((options->xdl_opts & XDF_WHITESPACE_FLAGS))
+       if ((options->xdl_opts & XDF_WHITESPACE_FLAGS) ||
+           options->ignore_regex_nr)
                options->flags.diff_from_contents = 1;
        else
                options->flags.diff_from_contents = 0;
@@ -6312,9 +6316,9 @@ static void diff_flush_patch_all_file_pairs(struct diff_options *o)
                        if (o->color_moved == COLOR_MOVED_ZEBRA_DIM)
                                dim_moved_lines(o);
 
-                       hashmap_free_entries(&add_lines, struct moved_entry,
+                       hashmap_clear_and_free(&add_lines, struct moved_entry,
                                                ent);
-                       hashmap_free_entries(&del_lines, struct moved_entry,
+                       hashmap_clear_and_free(&del_lines, struct moved_entry,
                                                ent);
                }