Skip to content

Commit 82b5fb0

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Winansi: Drop pre-Vista workaround (#6109)
1edeb9a (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: * 492f709 * 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.
2 parents 7aca039 + 44760f1 commit 82b5fb0

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

Documentation/git-svn.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git svn' <command> [<options>] [<arguments>]
12+
(UNSUPPORTED!)
1213

1314
DESCRIPTION
1415
-----------

git-svn.perl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,19 @@ sub term_init {
305305
: new Term::ReadLine 'git-svn';
306306
}
307307

308+
sub deprecated_warning {
309+
my @lines = @_;
310+
if (-t STDERR) {
311+
@lines = map { "\e[33m$_\e[0m" } @lines;
312+
}
313+
warn join("\n", @lines), "\n";
314+
}
315+
316+
deprecated_warning(
317+
"WARNING: \`git svn\` is no longer supported by the Git for Windows project.",
318+
"See https://github.com/git-for-windows/git/issues/5405 for details."
319+
);
320+
308321
my $cmd;
309322
for (my $i = 0; $i < @ARGV; $i++) {
310323
if (defined $cmd{$ARGV[$i]}) {

t/t9108-git-svn-glob.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ test_expect_success 'test disallow multi-globs' '
110110
svn_cmd commit -m "try to try"
111111
) &&
112112
test_must_fail git svn fetch three 2> stderr.three &&
113-
test_cmp expect.three stderr.three
113+
sed "/^WARNING.*no.* supported/{N;d}" <stderr.three >stderr.three.clean &&
114+
test_cmp expect.three stderr.three.clean
114115
'
115116

116117
test_done

t/t9109-git-svn-multi-glob.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ test_expect_success 'test disallow multiple globs' '
161161
svn_cmd commit -m "try to try"
162162
) &&
163163
test_must_fail git svn fetch three 2> stderr.three &&
164-
test_cmp expect.three stderr.three
164+
sed "/^WARNING.*no.* supported/{N;d}" <stderr.three >stderr.three.clean &&
165+
test_cmp expect.three stderr.three.clean
165166
'
166167

167168
test_done

t/t9168-git-svn-partially-globbed-names.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ test_expect_success 'test disallow prefixed multi-globs' '
155155
svn_cmd commit -m "try to try"
156156
) &&
157157
test_must_fail git svn fetch four 2>stderr.four &&
158-
test_cmp expect.four stderr.four &&
158+
sed "/^WARNING.*no.* supported/{N;d}" <stderr.four >stderr.four.clean &&
159+
test_cmp expect.four stderr.four.clean &&
159160
git config --unset svn-remote.four.branches &&
160161
git config --unset svn-remote.four.tags
161162
'
@@ -223,7 +224,8 @@ test_expect_success 'test disallow multiple asterisks in one word' '
223224
svn_cmd commit -m "try to try"
224225
) &&
225226
test_must_fail git svn fetch six 2>stderr.six &&
226-
test_cmp expect.six stderr.six
227+
sed "/^WARNING.*no.* supported/{N;d}" <stderr.six >stderr.six.clean &&
228+
test_cmp expect.six stderr.six.clean
227229
'
228230

229231
test_done

0 commit comments

Comments
 (0)