From: Junio C Hamano Date: Fri, 22 Jul 2022 22:04:02 +0000 (-0700) Subject: Merge branch 'js/vimdiff-quotepath-fix' X-Git-Tag: v2.38.0-rc0~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4483ea9a01d2a03641ce3c4e3723ea0bfeac705c;p=thirdparty%2Fgit.git Merge branch 'js/vimdiff-quotepath-fix' Variable quoting fix in the vimdiff driver of "git mergetool" * js/vimdiff-quotepath-fix: mergetool(vimdiff): allow paths to contain spaces again --- 4483ea9a01d2a03641ce3c4e3723ea0bfeac705c diff --cc mergetools/vimdiff index b045b10fd7,f7e7f27028..f770b8fe24 --- a/mergetools/vimdiff +++ b/mergetools/vimdiff @@@ -614,6 -614,37 +614,37 @@@ run_unit_tests () fi done + # verify that `merge_cmd` handles paths with spaces + record_parameters () { + >actual + for arg + do + echo "$arg" >>actual + done + } + + base_present=false + LOCAL='lo cal' + BASE='ba se' + REMOTE="' '" + MERGED='mer ged' + merge_tool_path=record_parameters + + merge_cmd vimdiff || at_least_one_ko=true + + cat >expect <<-\EOF + -f + -c - echo | split | vertical split | 1b | wincmd l | vertical split | quit | wincmd l | 2b | wincmd j | 3b | tabdo windo diffthis ++ echo | leftabove split | leftabove vertical split | 1b | wincmd l | leftabove vertical split | quit | wincmd l | 2b | wincmd j | 3b | tabdo windo diffthis + -c + tabfirst + lo cal + ' ' + mer ged + EOF + + diff -u expect actual || at_least_one_ko=true + if test "$at_least_one_ko" = "true" then return 255