Don't use the files inode as the hash.  Although it looks like a good idea for 
de-duplicating links as well, it has several issues, including non-uniqueness 
of inodes across file systems.
The way it was done hashing the inode but comparing the file name string 
pointers also made the hash mostly irrelevant, as it just stored filenames 
sharing the same inode in the same hash bucket but without
actually doing any de-duplication, making the whole thing a convoluted way of 
converting to a list.

Instead, hash and compare the filenames themselves, which, even though it 
doesn't handle links de-duplication, is better than the non-functional previous 
code.

Also, directly build the list and only use the hash table as a way for checking 
for duplicates, which is both faster and gives a stable output.

See #1989 
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/1991

-- Commit Summary --

  * tm: Cleanup include lookup

-- File Changes --

    M src/tagmanager/tm_workspace.c (18)

-- Patch Links --

https://github.com/geany/geany/pull/1991.patch
https://github.com/geany/geany/pull/1991.diff

-- 
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/1991

Reply via email to