Reorganize imports
It got kinda complicated, as every header needed something else from another header, which got kinda recursive. A mesh is nice, but not in this case.
(As seen with item_read.c, which needed an extra include so the compiler wouldn't error out)
Now utilities.h gets imported from the other local header files, and those are included in gitodoc.c
--- g ---
/ \
Setup now: u --- w --- g
\ /
--- r ---
Switching to this setup made it necessary to move some code.
The definition of the struct item_t was moved from item_read.h to utilities.h
The function check_setup() moved from utilities.h to git_handling.h, as it also checks for a git repo (not only if it's a directory).
ToDo: Look at check_setup and if can be modified. Either split the repo check out, or incorporate the whole thing in repo_check
Loading