Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
8427757f
Commit
8427757f
authored
Sep 13, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing up some win32 issues with autocrlf
parent
e399c7ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
tests-clar/diff/rename.c
+2
-0
tests-clar/filter/crlf.c
+1
-5
tests-clar/status/renames.c
+3
-1
No files found.
tests-clar/diff/rename.c
View file @
8427757f
...
@@ -7,6 +7,8 @@ static git_repository *g_repo = NULL;
...
@@ -7,6 +7,8 @@ static git_repository *g_repo = NULL;
void
test_diff_rename__initialize
(
void
)
void
test_diff_rename__initialize
(
void
)
{
{
g_repo
=
cl_git_sandbox_init
(
"renames"
);
g_repo
=
cl_git_sandbox_init
(
"renames"
);
cl_repo_set_bool
(
g_repo
,
"core.autocrlf"
,
false
);
}
}
void
test_diff_rename__cleanup
(
void
)
void
test_diff_rename__cleanup
(
void
)
...
...
tests-clar/filter/crlf.c
View file @
8427757f
...
@@ -5,16 +5,12 @@ static git_repository *g_repo = NULL;
...
@@ -5,16 +5,12 @@ static git_repository *g_repo = NULL;
void
test_filter_crlf__initialize
(
void
)
void
test_filter_crlf__initialize
(
void
)
{
{
git_config
*
cfg
;
g_repo
=
cl_git_sandbox_init
(
"crlf"
);
g_repo
=
cl_git_sandbox_init
(
"crlf"
);
cl_git_mkfile
(
"crlf/.gitattributes"
,
cl_git_mkfile
(
"crlf/.gitattributes"
,
"*.txt text
\n
*.bin binary
\n
*.crlf text eol=crlf
\n
*.lf text eol=lf
\n
"
);
"*.txt text
\n
*.bin binary
\n
*.crlf text eol=crlf
\n
*.lf text eol=lf
\n
"
);
cl_git_pass
(
git_repository_config
(
&
cfg
,
g_repo
));
cl_repo_set_bool
(
g_repo
,
"core.autocrlf"
,
true
);
cl_git_pass
(
git_config_set_string
(
cfg
,
"core.autocrlf"
,
"true"
));
git_config_free
(
cfg
);
}
}
void
test_filter_crlf__cleanup
(
void
)
void
test_filter_crlf__cleanup
(
void
)
...
...
tests-clar/status/renames.c
View file @
8427757f
...
@@ -11,6 +11,8 @@ static git_repository *g_repo = NULL;
...
@@ -11,6 +11,8 @@ static git_repository *g_repo = NULL;
void
test_status_renames__initialize
(
void
)
void
test_status_renames__initialize
(
void
)
{
{
g_repo
=
cl_git_sandbox_init
(
"renames"
);
g_repo
=
cl_git_sandbox_init
(
"renames"
);
cl_repo_set_bool
(
g_repo
,
"core.autocrlf"
,
false
);
}
}
void
test_status_renames__cleanup
(
void
)
void
test_status_renames__cleanup
(
void
)
...
@@ -67,7 +69,7 @@ static void test_status(
...
@@ -67,7 +69,7 @@ static void test_status(
actual
=
git_status_byindex
(
status_list
,
i
);
actual
=
git_status_byindex
(
status_list
,
i
);
expected
=
&
expected_list
[
i
];
expected
=
&
expected_list
[
i
];
cl_assert_equal_i
((
int
)
expected
->
status
,
(
int
)
actual
->
status
);
cl_assert_equal_i
_fmt
(
expected
->
status
,
actual
->
status
,
"%04x"
);
oldname
=
actual
->
head_to_index
?
actual
->
head_to_index
->
old_file
.
path
:
oldname
=
actual
->
head_to_index
?
actual
->
head_to_index
->
old_file
.
path
:
actual
->
index_to_workdir
?
actual
->
index_to_workdir
->
old_file
.
path
:
NULL
;
actual
->
index_to_workdir
?
actual
->
index_to_workdir
->
old_file
.
path
:
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment