Just scribbling if directory merging could work out...
temp compile merge...
Implemented a file-tree-counting mechanism
*sigh* ignore, needs work, work needs time, time needs me
Idea of using art_tree hash blobs (tmp)
Temporary weird commit again (changing machines)
Well, it worked once!
Yay, first working version.

Might randomly crash, leak memory in tons or just yield
wrong results. But it's a nice proof of concept.

Test-main:
$ clang $(ls src/*.c | grep -v main.c) src/checksums/*.c src/formats/*.c \
  src/libart/*.c  -std=c99  $(pkg-config --libs --cflags blkid glib-2.0) -Wall \
  -Wextra -D_RM_COMPILE_MAIN -D_BSD_SOURCE -Wall -Wextra -D_GNU_SOURCE \
  -DHAVE_BLKID=1 -lelf -lm -D_RM_COMPILE_MAIN_TM_ALL -ggdb3
$ find $(realpath tree) -type f | glibvg --leak-check=yes  ./a.out $(realpath tree)
Adding /home/sahib/rmlint/tree/sub4/a 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/sub4/diff 1fecde50989a40a26e612d6a0fb59c23
Encountered full directory: /home/sahib/rmlint/tree/sub4
Adding /home/sahib/rmlint/tree/top/sub1/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/top/sub1/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/top/sub1
Adding /home/sahib/rmlint/tree/top/sub2/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/top/sub2/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/top/sub2
Adding /home/sahib/rmlint/tree/sub3/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/sub3/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/sub3

Results:

3163ee7262bca05c /home/sahib/rmlint/tree/sub3
3163ee7262bca05c /home/sahib/rmlint/tree/top/sub2
3163ee7262bca05c /home/sahib/rmlint/tree/top/sub1
--

Dupes among other files:

  /home/sahib/rmlint/tree/sub4/diff
  /home/sahib/rmlint/tree/sub4/a
  /home/sahib/rmlint/tree/sub4/b
--
Fixed output of missing files
Correct handling of large files for treemerge.c
Sane way of counting files
Fixed small verbosity switch bug when specifying too many -v
Implemented directory sorting according to -S
Added -D (directory merge option/doesnt do anything yet)
Added free_digest flag to RmFile to prevent double frees.
Use rm_digest_hash and rm_digest_equal to group files in treemerge.c
Forgot to add treemerge.h
Handle non-matched dupe-file correctly.
Add code for hiding a RmDirectory behind a RmFile (to stay compatible with outputs)
Preparing for integration