summaryrefslogtreecommitdiff
path: root/blame.c
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2020-11-01 17:28:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-01 23:54:15 (GMT)
commit3af31e87868d46363359148db5243f46d49029e8 (patch)
tree942ac73d0963197969f917e35f33eafbd144c7eb /blame.c
parent88894aaeeae92e8cb41143cc2e045f50289dc790 (diff)
downloadgit-3af31e87868d46363359148db5243f46d49029e8.zip
git-3af31e87868d46363359148db5243f46d49029e8.tar.gz
git-3af31e87868d46363359148db5243f46d49029e8.tar.bz2
blame: simplify 'setup_blame_bloom_data' interface
The penultimate commit moved the initialization of 'sb.path' in 'builtin/blame.c::cmd_blame' before the call to 'blame.c::setup_blame_bloom_data'. Since 'cmd_blame' is the only caller of 'setup_blame_bloom_data', it is now unnecessary for 'setup_blame_bloom_data' to receive 'path' as a separate argument, as 'sb.path' is already initialized. Remove this argument from setup_blame_bloom_data's interface and use the 'path' field of the 'sb' 'struct blame_scoreboard' instead. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blame.c')
-rw-r--r--blame.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/blame.c b/blame.c
index 2d92af5..9156ebe 100644
--- a/blame.c
+++ b/blame.c
@@ -2887,8 +2887,7 @@ struct blame_entry *blame_entry_prepend(struct blame_entry *head,
return new_head;
}
-void setup_blame_bloom_data(struct blame_scoreboard *sb,
- const char *path)
+void setup_blame_bloom_data(struct blame_scoreboard *sb)
{
struct blame_bloom_data *bd;
struct bloom_filter_settings *bs;
@@ -2908,7 +2907,7 @@ void setup_blame_bloom_data(struct blame_scoreboard *sb,
bd->nr = 0;
ALLOC_ARRAY(bd->keys, bd->alloc);
- add_bloom_key(bd, path);
+ add_bloom_key(bd, sb->path);
sb->bloom_data = bd;
}