document updated 10 months ago, on May 17, 2022
It's a little rough around the edges, but it will do, if Git::Repository is unavailable.
- After instantiating with
Git->repository(...), you can fetch the $GIT_DIR and $GIT_WORK_TREE using:
- $GIT_DIR —
- $GIT_WORK_TREE —
- BUT note that this will still be set in bare repos! I guess you have to detect bare repos by comparing the $GIT_DIR and $GIT_WORK_TREE to see if they're [almost] the same? Very weird.
- Is it Windows-compatible at all? All path-manipulation seems to be done using string-concatenation, rather than using File::Spec or similar.
- Hrm. I don't like this module any more.