diff.c: do not pass diff options as keydata to hashmap

When we initialize the hashmap, we give it a pointer to the diff_options, which it then passes along to each call of the hashmap_cmp_fn function. There's no need to pass it a second time as the "keydata" parameter, and our comparison functions never look at keydata. This was a mistake left over from an earlier round of 2e2d5ac184 (diff.c: color moved lines differently, 2017-06-30), before hashmap learned to pass the data pointer for us. Explanation-by: Jeff King <peff@peff.net> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Jul 16, 2018 at 16:05 UTC 3783aad4c8e08ed7905bada47dc7b5df94bfa74a
1 file changed +2 -2
diff.c
+2 -2
@@ -842,13 +842,13 @@ static void mark_color_as_moved(struct diff_options *o,
842 case DIFF_SYMBOL_PLUS:
843 hm = del_lines;
844 key = prepare_entry(o, n);
845 - match = hashmap_get(hm, key, o);
845 + match = hashmap_get(hm, key, NULL);
846 free(key);
847 break;
848 case DIFF_SYMBOL_MINUS:
849 hm = add_lines;
850 key = prepare_entry(o, n);
851 - match = hashmap_get(hm, key, o);
851 + match = hashmap_get(hm, key, NULL);
852 free(key);
853 break;
854 default: