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:
Joerg Mayer 2014-05-11 21:27:06 +02:00 committed by Jörg Mayer
parent 7a010fa71b
commit 03f75ddfee
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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