]> git.ipfire.org Git - thirdparty/git.git/commit - decorate.c
decorate.c: compact table when growing
authorKevin Bracey <kevin@bracey.fi>
Thu, 16 May 2013 15:32:27 +0000 (18:32 +0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 May 2013 18:51:08 +0000 (11:51 -0700)
commit83f0412f3fff3b4108e7f05c30f3e861d148f5f2
tree59de20ddc75c27636de50f474b6c79d5d16c0efc
parenta765499a0884375c47c78d0d1e2926e875074427
decorate.c: compact table when growing

When growing the table, take the opportunity to "compact" it by removing
entries with NULL decoration.

Users may have "removed" decorations by passing NULL to
insert_decoration. An object's table entry can't actually be removed
during normal operation, as it would break the linear hash collision
search. But we can remove NULL decoration entries when rebuilding the
table.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
decorate.c