git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mergetool(vimdiff): allow paths to contain spaces again

From
Fernando Ramos <greenfoo@u92.eu>
Date
Jul 13, 2022, 21:33 UTC
Message-ID
<Ys86MnwhembiXRxj@zacax395.localdomain>
In-Reply-To
<xmqq7d4gbu10.fsf@gitster.g>
On 22/07/13 02:08PM, Junio C Hamano wrote:
> 
> I think s/1/true/ or something is in order, perhaps?
> 
Yes. I was just looking into that.

For one, as you said, "1" should be "true". That also changes the expected output.

Then, in addition, the expected output needs to be re-adjusted once again if we plan to apply this patch on top of the other one from two days ago (the one that adds the "leftabove" keyword to split subcommands).

After these changes, this is how the original patch from Johannes needs to be updated:

diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index 56516ae271..3046dcd0dc 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -623,7 +623,7 @@ run_unit_tests () {
 		done
 	}
 
-	base_present=1
+	base_present=true
 	LOCAL='lo cal'
 	BASE='ba se'
 	REMOTE="' '"
@@ -635,10 +635,11 @@ run_unit_tests () {
 	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 | -tabnew | leftabove split | leftabove vertical split | 1b | wincmd l | leftabove vertical split | 2b | wincmd l | 3b | wincmd j | 4b | tabnext | -tabnew | leftabove vertical split | 2b | wincmd l | 1b | tabnext | -tabnew | leftabove vertical split | 2b | wincmd l | 3b | tabnext | leftabove vertical split | leftabove split | 1b | wincmd j | leftabove split | 2b | wincmd j | 3b | wincmd l | 4b | tabdo windo diffthis
 	-c
 	tabfirst
 	lo cal
+	ba se
 	' '
 	mer ged
 	EOF
-- 
2.37.0
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 13 in “mergetool(vimdiff): allow paths to contain spaces again”
  1. mergetool(vimdiff): allow paths to contain spaces againJohannes Schindelin via GitGitGadget, Jul 13, 2022
  2. Junio C HamanoJul 13, 2022
  3. Fernando RamosJul 13, 2022
  4. Junio C HamanoJul 13, 2022
  5. Junio C HamanoJul 13, 2022
  6. Fernando RamosJul 13, 2022
  7. Junio C HamanoJul 13, 2022
  8. Junio C HamanoJul 13, 2022
  9. Fernando RamosJul 13, 2022
  10. Fernando RamosJul 13, 2022
  11. Junio C HamanoJul 13, 2022
  12. mergetool(vimdiff): allow paths to contain spaces againJohannes Schindelin via GitGitGadget, Jul 14, 2022
  13. Junio C HamanoJul 14, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.