Merge branch 'sh/mergetool-hideresolved'

"git mergetool" feeds three versions (base, local and remote) of
a conflicted path unmodified.  The command learned to optionally
prepare these files with unconflicted parts already resolved.

* sh/mergetool-hideresolved:
  mergetool: add per-tool support and overrides for the hideResolved flag
  mergetool: break setup_tool out into separate initialization function
  mergetool: add hideResolved configuration
This commit is contained in:
Junio C Hamano
2021-02-17 17:21:41 -08:00
6 changed files with 101 additions and 3 deletions

View File

@@ -166,6 +166,10 @@ setup_tool () {
return 1
}
hide_resolved_enabled () {
return 0
}
translate_merge_tool_path () {
echo "$1"
}
@@ -250,6 +254,10 @@ trust_exit_code () {
fi
}
initialize_merge_tool () {
# Bring tool-specific functions into scope
setup_tool "$1" || return 1
}
# Entry point for running tools
run_merge_tool () {
@@ -261,9 +269,6 @@ run_merge_tool () {
merge_tool_path=$(get_merge_tool_path "$1") || exit
base_present="$2"
# Bring tool-specific functions into scope
setup_tool "$1" || return 1
if merge_mode
then
run_merge_cmd "$1"