k
k copied to clipboard
[Fix #47] Refactor git checking
Speeds up runtime by 20-25%. Addresses issues with supplied git directories (#47)
- ensure directory can be cd'd into
pushdinto folders to check for repo- run git commands from correct directory
- check for repo in each base_dir, using
$GIT_TOPLEVELfor entirebase_dir - consolidate git-related (repomarker) code
- removed use of
$IS_GIT_REPO
Nice! thanks, will have to find some time to give a proper review, will get on it as soon as possible.
No problem, please let me know if anything's against your preferred style!
Hey there, just wanted to let you know I hadn't forgotten about this, just been very busy recently. I have just cracked how to do unit tests for k here so I want to get some coverage across the current code, then I will start merging the pull requests I have waiting. Thanks again.
No worries, testing looks really neat! By the way, I just figured out how to preserve dirs history with these changes as well.