[Github-comments] [geany/geany] Make geany -g tags output reproducible (#1989)

elextr notifications at xxxxx
Wed Nov 7 22:17:35 UTC 2018


> The code already checks if the hash table contains the element before inserting it, so it should be OK no matter which version is used.

Except that it will always fail to find it due to the bug, so it gets added anyway.

> If really the inode thing was useful, it should be used as the key directly rather than a bad convoluted hash that's guaranteed to have a worse stat() call count anyway.

Well, as I said above, everything gets added because a hash collision won't stop different paths being added, and due to the bug all paths are seen as different at the moment anyway, so duplicates so far havn't caused any "trouble" (the word from the original de-dup comment).  @b4n do you know what "trouble" they might cause? 

So clearly the inode stuff is not useful, and we should simply use `g_str_hash()` or totally forget de-duping since so far the fact that its failing hasn't caused problems (except perhaps some tags files are silently bigger than they need to be, but nobody has noticed and complained).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1989#issuecomment-436798263
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181107/16be3fff/attachment-0001.html>


More information about the Github-comments mailing list