[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 030f1c5 1/7: Fix incorrect command order
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 030f1c5 1/7: Fix incorrect command order |
Date: |
Thu, 16 Nov 2017 11:09:54 -0500 (EST) |
branch: master
commit 030f1c5b9f1d77b7f45e900b8486b8bfa121b7a9
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Fix incorrect command order
Moved the 'cd' command to the top. Changing to the directory where the
script resides wasn't a precondition for 'git config --global ...', but
it became a precondition when '--global' was removed, so invoking the
script from a different working directory did the wrong thing.
---
check_git_setup.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/check_git_setup.sh b/check_git_setup.sh
index 7335fc3..723f929 100755
--- a/check_git_setup.sh
+++ b/check_git_setup.sh
@@ -21,6 +21,11 @@
# email: <address@hidden>
# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+# Do this in the directory where this script resides, which is
+# deliberately the "toplevel" directory.
+
+cd $(dirname $(readlink --canonicalize $0))
+
# For msw (cygwin) only, make sure 'core.filemode' is "false". See:
# https://lists.nongnu.org/archive/html/lmi/2017-11/msg00018.html
@@ -37,10 +42,6 @@ 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 $(dirname $(readlink --canonicalize $0))
case "$(readlink -f .git/hooks)" in
("$(pwd)/.git/hooks")
- [lmi-commits] [lmi] master updated (2a7f972 -> c8de75e), Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 0b4d84b 2/7: Prefer $PWD to $(pwd), Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master bf52d55 6/7: Require a valid pre-commit hook to exist, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 68cc423 4/7: Regularize readlink options, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master f92ba83 3/7: Allow backup of old .git/hooks to fail, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 1e1716f 5/7: Assert rather than assume, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 030f1c5 1/7: Fix incorrect command order,
Greg Chicares <=
- [lmi-commits] [lmi] master c8de75e 7/7: Show symlink in a few of its many guises, Greg Chicares, 2017/11/16