Merge branch 'rs/work-around-grep-opt-insanity'
* rs/work-around-grep-opt-insanity: Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool() Conflicts: git-instaweb.sh
This commit is contained in:
@ -338,15 +338,14 @@ guess_merge_tool () {
|
||||
fi
|
||||
tools="$tools gvimdiff diffuse ecmerge p4merge araxis"
|
||||
fi
|
||||
if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then
|
||||
# $EDITOR is emacs so add emerge as a candidate
|
||||
tools="$tools emerge vimdiff"
|
||||
elif echo "${VISUAL:-$EDITOR}" | grep vim > /dev/null 2>&1; then
|
||||
# $EDITOR is vim so add vimdiff as a candidate
|
||||
case "${VISUAL:-$EDITOR}" in
|
||||
*vim*)
|
||||
tools="$tools vimdiff emerge"
|
||||
else
|
||||
;;
|
||||
*)
|
||||
tools="$tools emerge vimdiff"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
echo >&2 "merge tool candidates: $tools"
|
||||
|
||||
# Loop over each candidate and stop when a valid merge tool is found.
|
||||
|
Reference in New Issue
Block a user