summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-07-16 23:05:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-17 18:25:31 (GMT)
commit3783aad4c8e08ed7905bada47dc7b5df94bfa74a (patch)
tree74e16409879b531c6b20c50b496b362590a196a6 /diff.c
parent74cfa7bed96ea003e0a3ea20455096187c517b19 (diff)
downloadgit-3783aad4c8e08ed7905bada47dc7b5df94bfa74a.zip
git-3783aad4c8e08ed7905bada47dc7b5df94bfa74a.tar.gz
git-3783aad4c8e08ed7905bada47dc7b5df94bfa74a.tar.bz2
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 1289df4..ce7bedc 100644
--- a/diff.c
+++ b/diff.c
@@ -842,13 +842,13 @@ static void mark_color_as_moved(struct diff_options *o,
case DIFF_SYMBOL_PLUS:
hm = del_lines;
key = prepare_entry(o, n);
- match = hashmap_get(hm, key, o);
+ match = hashmap_get(hm, key, NULL);
free(key);
break;
case DIFF_SYMBOL_MINUS:
hm = add_lines;
key = prepare_entry(o, n);
- match = hashmap_get(hm, key, o);
+ match = hashmap_get(hm, key, NULL);
free(key);
break;
default: