It is possible to check out a source tree that is not co-located with
the .git repository. First attempts to support that setup. Change-Id: Ie1560c372e23e58fb0e310f681388b5e1a65ba5b Reviewed-on: https://code.wireshark.org/review/1596 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
parent
7a010fa71b
commit
03f75ddfee
|
@ -8,8 +8,9 @@
|
|||
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
|
||||
#
|
||||
|
||||
"$GIT_DIR" || GIT_DIR=.git
|
||||
# Check for newer versions of the pre-commit script
|
||||
if [ ./.git/hooks/pre-commit -ot ./tools/pre-commit ] ; then
|
||||
if [ ${GIT_DIR}/hooks/pre-commit -ot ./tools/pre-commit ] ; then
|
||||
echo "Pre-commit hook script is outdated, please update!"
|
||||
fi
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ function ws_exit_error() {
|
|||
|
||||
echo -e "\n" >> $TMP_DIR/${ERR_FILE}.header
|
||||
|
||||
if [ -d .git ] ; then
|
||||
if [ -d ${GIT_DIR:-.git} ] ; then
|
||||
echo -e "\nGit commit" >> $TMP_DIR/${ERR_FILE}.header
|
||||
git log -1 >> $TMP_DIR/${ERR_FILE}.header
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue