I'm looking to improve my
gitinfo package by reducing the amount of setup needed.
For this, I want to be able to search for a file in the current directory, then the parent, then the grandparent ... until either (a) I find the file [OK] or (b) find a directory called
.git [Error message a] or (c) fall off the top of the file system tree [Error message b].
I've tried nesting
\InputIfFileExists, but that only gives me a fixed maximum number of levels.
Sorry, I really don't have a clue as to the simplest approach; so pointers to useful packages to use or copy would be a good option, rather than predigested answers (though these, obviously, would be very welcome).
Having done a little more reading, finding a directory might be a bit more difficult, so finding a file
.git/description would do.