Winansi: Drop pre-Vista workaround (#6109)

1edeb9abf5
(Win32: warn if the console font doesn't support Unicode,
2014-06-10) introduced both code to detect the current console font on
Windows Vista and newer and a fallback for older systems to detect the
default console font and issue a warning if that font doesn't support
unicode.

Since we haven't supported any Windows older than Vista in almost a
decade, we don't need to keep the workaround.

This more or less fell out of #6108, but didn't quite fit into that PR.

There are also some other version specific hacks and workarounds I
considered dropping, but decided against:

*
492f70913e
* I'm unsure if this regression has ever been fixed or just become the
new normal.
* #5042
* So far this hasn't been an issue on Windows 8.1, but officially Go
1.21 and newer only support Windows 10 and newer. So this might become a
problem at any point.
This commit is contained in:
Johannes Schindelin
2026-04-06 09:16:14 +02:00
committed by Git for Windows Build Agent
5 changed files with 22 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ SYNOPSIS
--------
[verse]
'git svn' <command> [<options>] [<arguments>]
(UNSUPPORTED!)
DESCRIPTION
-----------

View File

@@ -305,6 +305,19 @@ sub term_init {
: new Term::ReadLine 'git-svn';
}
sub deprecated_warning {
my @lines = @_;
if (-t STDERR) {
@lines = map { "\e[33m$_\e[0m" } @lines;
}
warn join("\n", @lines), "\n";
}
deprecated_warning(
"WARNING: \`git svn\` is no longer supported by the Git for Windows project.",
"See https://github.com/git-for-windows/git/issues/5405 for details."
);
my $cmd;
for (my $i = 0; $i < @ARGV; $i++) {
if (defined $cmd{$ARGV[$i]}) {

View File

@@ -110,7 +110,8 @@ test_expect_success 'test disallow multi-globs' '
svn_cmd commit -m "try to try"
) &&
test_must_fail git svn fetch three 2> stderr.three &&
test_cmp expect.three stderr.three
sed "/^WARNING.*no.* supported/{N;d}" <stderr.three >stderr.three.clean &&
test_cmp expect.three stderr.three.clean
'
test_done

View File

@@ -161,7 +161,8 @@ test_expect_success 'test disallow multiple globs' '
svn_cmd commit -m "try to try"
) &&
test_must_fail git svn fetch three 2> stderr.three &&
test_cmp expect.three stderr.three
sed "/^WARNING.*no.* supported/{N;d}" <stderr.three >stderr.three.clean &&
test_cmp expect.three stderr.three.clean
'
test_done

View File

@@ -155,7 +155,8 @@ test_expect_success 'test disallow prefixed multi-globs' '
svn_cmd commit -m "try to try"
) &&
test_must_fail git svn fetch four 2>stderr.four &&
test_cmp expect.four stderr.four &&
sed "/^WARNING.*no.* supported/{N;d}" <stderr.four >stderr.four.clean &&
test_cmp expect.four stderr.four.clean &&
git config --unset svn-remote.four.branches &&
git config --unset svn-remote.four.tags
'
@@ -223,7 +224,8 @@ test_expect_success 'test disallow multiple asterisks in one word' '
svn_cmd commit -m "try to try"
) &&
test_must_fail git svn fetch six 2>stderr.six &&
test_cmp expect.six stderr.six
sed "/^WARNING.*no.* supported/{N;d}" <stderr.six >stderr.six.clean &&
test_cmp expect.six stderr.six.clean
'
test_done