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
b0df89d9
Commit
b0df89d9
authored
Jan 04, 2012
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #526 from nulltoken/fix/attr
Fix some "attributes" related issues
parents
7d93f96a
f46e6226
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
src/attr.c
+1
-1
src/fileops.c
+1
-1
tests-clay/attr/file.c
+4
-2
No files found.
src/attr.c
View file @
b0df89d9
...
...
@@ -73,7 +73,7 @@ int git_attr_get_many(
attr_get_many_info
*
info
=
NULL
;
size_t
num_found
=
0
;
memset
(
values
,
0
,
sizeof
(
const
char
*
)
*
num_attr
);
memset
(
(
void
*
)
values
,
0
,
sizeof
(
const
char
*
)
*
num_attr
);
if
((
error
=
git_attr_path__init
(
&
path
,
pathname
))
<
GIT_SUCCESS
||
(
error
=
collect_attr_files
(
repo
,
pathname
,
&
files
))
<
GIT_SUCCESS
)
...
...
src/fileops.c
View file @
b0df89d9
...
...
@@ -486,7 +486,7 @@ static int win32_find_system_file(git_buf *path, const char *filename)
filename
++
;
if
(
gitwin_append_utf16
(
file_utf16
+
root
->
len
-
1
,
filename
,
len
+
1
)
!=
(
int
)
len
)
{
(
int
)
len
+
1
)
{
error
=
git__throw
(
GIT_EOSERR
,
"Failed to build file path"
);
goto
cleanup
;
}
...
...
tests-clay/attr/file.c
View file @
b0df89d9
...
...
@@ -7,19 +7,21 @@
void
test_attr_file__simple_read
(
void
)
{
git_attr_file
*
file
=
NULL
;
git_attr_assignment
*
assign
;
git_attr_rule
*
rule
;
cl_git_pass
(
git_attr_file__from_file
(
NULL
,
cl_fixture
(
"attr/attr0"
),
&
file
));
cl_assert_strequal
(
cl_fixture
(
"attr/attr0"
),
file
->
path
);
cl_assert
(
file
->
rules
.
length
==
1
);
git_attr_rule
*
rule
=
get_rule
(
0
);
rule
=
get_rule
(
0
);
cl_assert
(
rule
!=
NULL
);
cl_assert_strequal
(
"*"
,
rule
->
match
.
pattern
);
cl_assert
(
rule
->
match
.
length
==
1
);
cl_assert
(
rule
->
match
.
flags
==
0
);
cl_assert
(
rule
->
assigns
.
length
==
1
);
git_attr_assignment
*
assign
=
get_assign
(
rule
,
0
);
assign
=
get_assign
(
rule
,
0
);
cl_assert
(
assign
!=
NULL
);
cl_assert_strequal
(
"binary"
,
assign
->
name
);
cl_assert
(
assign
->
value
==
GIT_ATTR_TRUE
);
...
...
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