Taylor Blau wrote: > There are many functions in commit.h that are more related to shallow > repositories than they are to any sort of generic commit machinery. > Likely this began when there were only a few shallow-related functions, > and commit.h seemed a reasonable enough place to put them. > > But, now there are a good number of shallow-related functions, and > placing them all in 'commit.h' doesn't make sense. Sure. For me, there are a few additional sources of motivation: - shallow clone is a bit of a thorny feature, so I like having the indication of which source files are interacting with it - this will give us a good place to put any overview documentation on the shallow API > This patch extracts a 'shallow.h', which takes all of the headers from > 'commit.h' for functions which already exist in 'shallow.c'. We will > bring the remaining shallow-related functions defined in 'commit.c' in a > subsequent patch. > > For now, move only the ones that already are implemented in 'shallow.c', > and update the necessary includes. It's probably worth a mention of the builtin.h part here. (By the way, I wouldn't be against propagating that to the callers, to better match what https://include-what-you-use.org/ would enforce.) Thanks, Jonathan