MSYS2-packages/git/0001-aspell.patch
Christoph Reiter a80e996b2b
git: fix aspell support for git-gui (#5669)
mingw aspell has a broken --mode, and "dump dicts" is also broken
(maybe relocation missing?) so force the cygwin variant.

Fixes #5668
2025-09-25 10:11:54 +02:00

41 lines
1.5 KiB
Diff

--- git-2.51.0/git-gui/git-gui.sh.orig 2025-08-18 02:18:23.000000000 +0200
+++ git-2.51.0/git-gui/git-gui.sh 2025-09-25 09:14:55.155971300 +0200
@@ -3919,7 +3936,7 @@
#
set spell_cmd [list |]
set spell_dict [get_config gui.spellingdictionary]
- lappend spell_cmd aspell
+ lappend spell_cmd [exec cygpath --windows --absolute {/usr/bin/aspell}]
if {$spell_dict ne {}} {
lappend spell_cmd --master=$spell_dict
}
--- git-2.51.0/git-gui/lib/spellcheck.tcl.orig 2025-08-18 02:18:23.000000000 +0200
+++ git-2.51.0/git-gui/lib/spellcheck.tcl 2025-09-25 09:14:06.155400800 +0200
@@ -43,7 +43,7 @@
if {$s_prog eq {aspell}
&& [regexp -nocase {^Usage: } $err]
&& ![catch {
- set pipe_fd [open [list | $s_prog -v] r]
+ set pipe_fd [open [list | [exec cygpath --windows --absolute {/usr/bin/aspell}] -v] r]
gets $pipe_fd s_version
close $pipe_fd
}]
@@ -124,7 +124,7 @@
method lang {{n {}}} {
if {$n ne {} && $s_lang ne $n && !$s_failed} {
set spell_cmd [list |]
- lappend spell_cmd aspell
+ lappend spell_cmd [exec cygpath --windows --absolute {/usr/bin/aspell}]
lappend spell_cmd --master=$n
lappend spell_cmd --mode=none
lappend spell_cmd --encoding=UTF-8
@@ -401,7 +401,7 @@
proc available_langs {} {
set langs [list]
catch {
- set fd [open [list | aspell dump dicts] r]
+ set fd [open [list | [exec cygpath --windows --absolute {/usr/bin/aspell}] dump dicts] r]
while {[gets $fd line] >= 0} {
if {$line eq {}} continue
lappend langs $line