Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-xgit-sh-setup.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 8cbd153b62..185c5c6c95 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -116,6 +116,16 @@ then
exit $exit
}
else
- GIT_DIR=$(git rev-parse --git-dir) || exit
+ GIT_DIR=$(git rev-parse --git-dir) || {
+ exit=$?
+ echo >&2 "Failed to find a valid git directory."
+ exit $exit
+ }
fi
+
+test -n "$GIT_DIR" && GIT_DIR=$(cd "$GIT_DIR" && pwd) || {
+ echo >&2 "Unable to determine absolute path of git directory"
+ exit 1
+}
+
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}