Skip to content

Commit 13a8bc9

Browse files
committed
crlf_data: move to a "to_workdir" folder
Move the crlf_data folders reponsible for holding the state of the filters going into the working directory to "to_workdir" variations of the folder name to accommodate future growth into the "to odb" filter variation. Update the script to create these new folders as appopriate.
1 parent 788fccc commit 13a8bc9

File tree

1,371 files changed

+11
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,371 files changed

+11
-5
lines changed

tests/checkout/crlf.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
9999
{
100100
git_buf attrbuf = GIT_BUF_INIT;
101101
git_buf expected_dirname = GIT_BUF_INIT;
102+
git_buf systype_and_direction = GIT_BUF_INIT;
102103
git_buf sandboxname = GIT_BUF_INIT;
103104
git_buf reponame = GIT_BUF_INIT;
104105
git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
@@ -107,6 +108,9 @@ static void test_checkout(const char *autocrlf, const char *attrs)
107108

108109
git_buf_puts(&reponame, "crlf");
109110

111+
git_buf_puts(&systype_and_direction, systype);
112+
git_buf_puts(&systype_and_direction, "_to_workdir");
113+
110114
git_buf_puts(&sandboxname, "autocrlf_");
111115
git_buf_puts(&sandboxname, autocrlf);
112116

@@ -128,7 +132,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
128132

129133
cl_repo_set_string(g_repo, "core.autocrlf", autocrlf);
130134

131-
git_buf_joinpath(&expected_dirname, systype, sandboxname.ptr);
135+
git_buf_joinpath(&expected_dirname, systype_and_direction.ptr, sandboxname.ptr);
132136
git_buf_joinpath(&expected_fixture, "crlf_data", expected_dirname.ptr);
133137
cl_fixture_sandbox(expected_fixture.ptr);
134138

@@ -145,6 +149,7 @@ static void test_checkout(const char *autocrlf, const char *attrs)
145149
git_buf_dispose(&expected_fixture);
146150
git_buf_dispose(&expected_dirname);
147151
git_buf_dispose(&sandboxname);
152+
git_buf_dispose(&systype_and_direction);
148153
git_buf_dispose(&reponame);
149154
}
150155

@@ -173,7 +178,7 @@ void test_checkout_crlf__matches_core_git(void)
173178
const char *autocrlf[] = { "true", "false", "input", NULL };
174179
const char *attrs[] = { "", "-crlf", "-text", "eol=crlf", "eol=lf",
175180
"text", "text eol=crlf", "text eol=lf",
176-
"text=auto", "text=auto eol=crlf", "text=auto eol=lf",
181+
"text=auto", "text=auto eol=crlf", "text=auto eol=lf",
177182
NULL };
178183
const char **a, **b;
179184

tests/resources/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* binary
2+
*.sh text diff merge eol=lf

tests/resources/crlf_data/posix/autocrlf_false,-crlf/all-crlf renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/all-crlf

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/all-crlf-utf8bom renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/all-crlf-utf8bom

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/all-lf renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/all-lf

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/all-lf-utf8bom renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/all-lf-utf8bom

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/binary-all-crlf renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/binary-all-crlf

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/binary-all-lf renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/binary-all-lf

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/binary-mixed-lf-cr renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/binary-mixed-lf-cr

File renamed without changes.

tests/resources/crlf_data/posix/autocrlf_false,-crlf/binary-mixed-lf-cr-crlf renamed to tests/resources/crlf_data/posix_to_workdir/autocrlf_false,-crlf/binary-mixed-lf-cr-crlf

File renamed without changes.

0 commit comments

Comments
 (0)