Skip to content

Commit b4c7bf8

Browse files
committed
mingw: avoid illegal filename in t9118
On Windows' file systems, file names with trailing dots are forbidden. The POSIX emulation layer used by Git for Windows' Subversion emulates those file names, therefore the test adding the file would actually succeed, but when we would ask git.exe (which does not leverage the POSIX emulation layer) to check out the tree, it would fail. Let's just guard the test using a filename that is illegal on Windows by the MINGW prereq. This lets t9118-git-svn-funky-branch-names.sh pass in Git for Windows' SDK. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fd60a30 commit b4c7bf8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

t/t9118-git-svn-funky-branch-names.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '
2323
"$svnrepo/pr ject/branches/$scary_uri" &&
2424
svn_cmd cp -m "leading dot" "$svnrepo/pr ject/trunk" \
2525
"$svnrepo/pr ject/branches/.leading_dot" &&
26-
svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
27-
"$svnrepo/pr ject/branches/trailing_dot." &&
26+
if test_have_prereq !MINGW
27+
then
28+
svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
29+
"$svnrepo/pr ject/branches/trailing_dot."
30+
fi &&
2831
svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
2932
"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
3033
svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
@@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '
4548
git rev-parse "refs/remotes/origin/more%20fun%20plugin!" &&
4649
git rev-parse "refs/remotes/origin/$scary_ref" &&
4750
git rev-parse "refs/remotes/origin/%2Eleading_dot" &&
48-
git rev-parse "refs/remotes/origin/trailing_dot%2E" &&
51+
if test_have_prereq !MINGW
52+
then
53+
git rev-parse "refs/remotes/origin/trailing_dot%2E"
54+
fi &&
4955
git rev-parse "refs/remotes/origin/trailing_dotlock%2Elock" &&
5056
git rev-parse "refs/remotes/origin/$non_reflog"
5157
)

0 commit comments

Comments
 (0)