Merge branch 'da/mergetool-tool-help'
Allow "git mergetool --help" to run outside a Git repository. * da/mergetool-tool-help: difftool: don't assume that default sh is sane mergetool: don't require a work tree for --tool-help git-sh-setup: move GIT_DIR initialization into a function mergetool: use more conservative temporary filenames test-lib-functions: adjust style to match CodingGuidelines t7610-mergetool: prefer test_config over git config
This commit is contained in:
@ -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 () {
|
||||
|
Reference in New Issue
Block a user