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
b4d183a7
Commit
b4d183a7
authored
Sep 16, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkout::tree tests: don't use static buffer
parent
33cad995
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
tests/checkout/tree.c
+9
-6
No files found.
tests/checkout/tree.c
View file @
b4d183a7
...
...
@@ -989,15 +989,18 @@ void test_checkout_tree__filemode_preserved_in_index(void)
mode_t
read_filemode
(
const
char
*
path
)
{
git_buf
fullpath
=
GIT_BUF_INIT
;
struct
stat
st
;
char
pathabs
[
256
]
=
{
0
}
;
mode_t
result
;
strcat
(
pathabs
,
clar_sandbox_path
());
strcat
(
pathabs
,
"/testrepo/"
);
strcat
(
pathabs
,
path
);
cl_must_pass
(
p_stat
(
pathabs
,
&
st
));
git_buf_joinpath
(
&
fullpath
,
"testrepo"
,
path
);
cl_must_pass
(
p_stat
(
fullpath
.
ptr
,
&
st
));
return
st
.
st_mode
;
result
=
GIT_PERMS_IS_EXEC
(
st
.
st_mode
)
?
0100755
:
0100644
;
git_buf_free
(
&
fullpath
);
return
result
;
}
void
test_checkout_tree__filemode_preserved_in_workdir
(
void
)
...
...
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