lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 96d6c8e 3/4: Run 'check_git_setup.sh' in the


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 96d6c8e 3/4: Run 'check_git_setup.sh' in the directory where it resides
Date: Mon, 13 Nov 2017 14:11:28 -0500 (EST)

branch: master
commit 96d6c8e3cf15356148e36877e81500418fc737de
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Run 'check_git_setup.sh' in the directory where it resides
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2017-11/msg00022.html
    for a discussion of the danger averted by this change.
---
 check_git_setup.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/check_git_setup.sh b/check_git_setup.sh
index 6021d09..4b9f7b6 100755
--- a/check_git_setup.sh
+++ b/check_git_setup.sh
@@ -37,8 +37,10 @@ esac
 printf "core.filemode is '%s'\n" $(git config --get-all core.filemode)
 
 # Make sure the hooks in the repository's hooks/ directory are used.
+# Do this in the directory where this script resides, which is
+# deliberately the "toplevel" directory.
 
-cd $(git rev-parse --show-toplevel)
+cd $(dirname $(readlink --canonicalize $0))
 case "$(readlink -f .git/hooks)" in
   ("$(pwd)/.git/hooks")
     printf "must reconfigure git hooks directory\n"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]