git-commit-id-maven-plugin icon indicating copy to clipboard operation
git-commit-id-maven-plugin copied to clipboard

Search parent directories for .git dir

Open banzera opened this issue 12 years ago • 1 comments

I ran into the issue described in ktoso/maven-git-commit-id-plugin#113 today. While I like the rev-parse idea and have seen that implemented in other places, I just opted to search parent directories until I find a .git directory within one.

To keep the tests passing, I had to modify them to use a different sandbox directory--one not parented by the project, otherwise the recursive parent calls would pick up the maven-git-command-id-plugin's git directory mistakenly.

This is working great for me now, but I welcome feedback.

banzera avatar Aug 22 '14 17:08 banzera

I'll have a look tonight! Thanks for contributing :)

ktoso avatar Aug 22 '14 17:08 ktoso