Re: [RFC/PATCH] Implement poor-man's submodule support in pre-commit hook
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 20, 2006, 11:59 UTC
- Message-ID
- <emb8ev$egb$1@sea.gmane.org>
- In-Reply-To
- <200612201008.49045.andyparkins@gmail.com>
Andy Parkins wrote:
Show 7 quoted lines
> Help...
>
>> +if [ -f .gitmodules ]; then
>
> This doesn't work because git-commit is not necessarily in the root of the
> working tree. How do I safely get that root? While ${GIT_DIR}/.. would work
> it is not guaranteed.Do you want "git rev-parse --show-prefix" or "git rev-parse --show-cdup", or "git rev-parse --git-dir" perhaps? (Although here rev in rev-parse is misnomer).
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git