diff options
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r-- | git-sh-setup.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 5f28b32dc7..c42c6e6365 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -81,7 +81,7 @@ if test -n "$OPTIONS_SPEC"; then echo exit $? )" else - dashless=$(basename "$0" | sed -e 's/-/ /') + dashless=$(basename -- "$0" | sed -e 's/-/ /') usage() { die "usage: $dashless $USAGE" } @@ -160,7 +160,7 @@ git_pager() { else GIT_PAGER=cat fi - : ${LESS=-FRSX} + : ${LESS=-FRX} : ${LV=-c} export LESS LV @@ -330,8 +330,7 @@ esac # Make sure we are in a valid repository of a vintage we understand, # if we require to be in a git repository. -if test -z "$NONGIT_OK" -then +git_dir_init () { GIT_DIR=$(git rev-parse --git-dir) || exit if [ -z "$SUBDIRECTORY_OK" ] then @@ -346,6 +345,11 @@ then exit 1 } : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"} +} + +if test -z "$NONGIT_OK" +then + git_dir_init fi peel_committish () { |